From bb12c7e2a93bd851bc373f750e62c3b58dcc2bf7 Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Thu, 13 Jun 2024 18:10:42 -0700 Subject: [PATCH] UIManagerModule Fix for Android --- .../reactlibrary/RNInstabugReactnativeModule.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java index 0cd0a3940a..0cfc9ff688 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java @@ -15,11 +15,12 @@ import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactMethod; import com.facebook.react.bridge.ReadableArray; +import com.facebook.react.bridge.UIManager; import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeArray; import com.facebook.react.bridge.WritableNativeMap; -import com.facebook.react.uimanager.UIManagerModule; +import com.facebook.react.uimanager.UIManagerHelper; import com.instabug.library.Feature; import com.instabug.library.Instabug; import com.instabug.library.InstabugColorTheme; @@ -922,13 +923,13 @@ public void networkLog(String jsonObject) throws JSONException { @Nullable private View resolveReactView(final int reactTag) { final ReactApplicationContext reactContext = getReactApplicationContext(); - final UIManagerModule uiManagerModule = reactContext.getNativeModule(UIManagerModule.class); + final UIManager uiManager = UIManagerHelper.getUIManagerForReactTag(reactContext, reactTag); - if (uiManagerModule == null) { + if (uiManager == null) { return null; } - return uiManagerModule.resolveView(reactTag); + return uiManager.resolveView(reactTag); }