From 180a8b22a04199573ab4a087025438b76011e2f3 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Fri, 25 Oct 2024 11:23:49 -0600 Subject: [PATCH] Merge pull request #51489 from software-mansion-labs/@wolewicki/revert-bridgeless fix: revert bridgeless on Android (cherry picked from commit 2db49d4759d0008e2fb177523cd574290513e3c8) (CP triggered by Beamanator) --- .../app/src/main/java/com/expensify/chat/MainApplication.kt | 2 +- .../@react-native-firebase+app+12.9.3+002+bridgeless.patch | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/MainApplication.kt b/android/app/src/main/java/com/expensify/chat/MainApplication.kt index f476ad89c5b4..942304c80445 100644 --- a/android/app/src/main/java/com/expensify/chat/MainApplication.kt +++ b/android/app/src/main/java/com/expensify/chat/MainApplication.kt @@ -64,7 +64,7 @@ class MainApplication : MultiDexApplication(), ReactApplication { SoLoader.init(this, /* native exopackage */false) if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { // If you opted-in for the New Architecture, we load the native entry point for this app. - load() + load(bridgelessEnabled = false) } if (BuildConfig.DEBUG) { FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false) diff --git a/patches/@react-native-firebase+app+12.9.3+002+bridgeless.patch b/patches/@react-native-firebase+app+12.9.3+002+bridgeless.patch index a085cdbcfbe2..54ae4d9a1c58 100644 --- a/patches/@react-native-firebase+app+12.9.3+002+bridgeless.patch +++ b/patches/@react-native-firebase+app+12.9.3+002+bridgeless.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js -index 03f001c..23d467d 100644 +index 03f001c..358c795 100644 --- a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js +++ b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js @@ -65,7 +65,7 @@ function nativeModuleWrapped(namespace, NativeModule, argToPrepend) { @@ -7,7 +7,7 @@ index 03f001c..23d467d 100644 } - const properties = Object.keys(NativeModule); -+ const properties = Object.keys(Object.getPrototypeOf(NativeModule)); ++ const properties = [...Object.keys(Object.getPrototypeOf(NativeModule)), ...Object.keys(NativeModule)]; for (let i = 0, len = properties.length; i < len; i++) { const property = properties[i];