From 83411746f186447f5b70753796ff3c44358f0edd Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Wed, 15 May 2024 08:43:59 -0700 Subject: [PATCH] Revert D57329165: Shortcut emitDeviceEvent in bridgeless Differential Revision: D57329165 Original commit changeset: 6506a7afb522 Original Phabricator Diff: D57329165 fbshipit-source-id: 98fb81b7c16a2330f1bd58ad6bbfee6f04934b57 --- .../facebook/react/runtime/BridgelessReactContext.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.java index 739555e2f7bca7..97a1bedabef657 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.java @@ -134,8 +134,6 @@ public T getJSModule(Class jsInterface) { && mInteropModuleRegistry.shouldReturnInteropModule(jsInterface)) { return mInteropModuleRegistry.getInteropModule(jsInterface); } - - // TODO T189052462: ReactContext caches JavaScriptModule instances JavaScriptModule interfaceProxy = (JavaScriptModule) Proxy.newProxyInstance( @@ -145,13 +143,6 @@ public T getJSModule(Class jsInterface) { return (T) interfaceProxy; } - /** Shortcut RCTDeviceEventEmitter.emit since it's frequently used */ - @Override - public void emitDeviceEvent(String eventName, @Nullable Object args) { - mReactHost.callFunctionOnModule( - "RCTDeviceEventEmitter", "emit", Arguments.fromJavaArgs(new Object[] {args})); - } - @Override public boolean hasNativeModule(Class nativeModuleInterface) { return mReactHost.hasNativeModule(nativeModuleInterface);