mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Kotlinify NotificationOnlyHandler (#43745)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43745 Changelog: [Internal] As part of the Sustainability Week (see [post](https://fb.workplace.com/groups/251759413609061/permalink/742797531171911/)). Reviewed By: rshest Differential Revision: D55601731 fbshipit-source-id: d5da4002ee12cea1b2e04df237cfd27a4727df05
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b9dc0ae7de
commit
de617d03e1
-24
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.packagerconnection;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
public abstract class NotificationOnlyHandler implements RequestHandler {
|
||||
private static final String TAG = JSPackagerClient.class.getSimpleName();
|
||||
|
||||
public final void onRequest(@Nullable Object params, Responder responder) {
|
||||
responder.error("Request is not supported");
|
||||
FLog.e(TAG, "Request is not supported");
|
||||
}
|
||||
|
||||
public abstract void onNotification(@Nullable Object params);
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.packagerconnection
|
||||
|
||||
import com.facebook.common.logging.FLog
|
||||
|
||||
public abstract class NotificationOnlyHandler : RequestHandler {
|
||||
|
||||
override final fun onRequest(params: Any?, responder: Responder) {
|
||||
responder.error("Request is not supported")
|
||||
FLog.e(JSPackagerClient::class.java.simpleName, "Request is not supported")
|
||||
}
|
||||
|
||||
override abstract fun onNotification(params: Any?)
|
||||
}
|
||||
Reference in New Issue
Block a user