Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ public ReactDelegate(
mReactNativeHost = reactNativeHost;
}

@Nullable
private DevSupportManager getDevSupportManager() {
if (ReactFeatureFlags.enableBridgelessArchitecture
&& mReactHost != null
&& mReactHost.getDevSupportManager() != null) {
return mReactHost.getDevSupportManager();
} else if (getReactNativeHost().hasInstance()
&& getReactNativeHost().getUseDeveloperSupport()) {
return getReactNativeHost().getReactInstanceManager().getDevSupportManager();
} else {
return null;
}
}

public void onHostResume() {
if (!(mActivity instanceof DefaultHardwareBackBtnHandler)) {
throw new ClassCastException(
Expand Down Expand Up @@ -258,15 +272,8 @@ protected ReactRootView createRootView() {
* application.
*/
public boolean shouldShowDevMenuOrReload(int keyCode, KeyEvent event) {
DevSupportManager devSupportManager = null;
if (ReactFeatureFlags.enableBridgelessArchitecture
&& mReactHost != null
&& mReactHost.getDevSupportManager() != null) {
devSupportManager = mReactHost.getDevSupportManager();
} else if (getReactNativeHost().hasInstance()
&& getReactNativeHost().getUseDeveloperSupport()) {
devSupportManager = getReactNativeHost().getReactInstanceManager().getDevSupportManager();
} else {
DevSupportManager devSupportManager = getDevSupportManager();
if (devSupportManager == null) {
return false;
}

Expand Down