Skip to content

Commit

Permalink
Fix for app restart on Android in case of remote debugging
Browse files Browse the repository at this point in the history
Added a check in setRemoteJSDebugEnabled in DevSupportManagerBase.java to check for PREFS_REMOTE_JS_DEBUG_KEY to see if the value has changed.
  • Loading branch information
Sushant-Sardeshpande authored Jul 25, 2024
1 parent 949c2bb commit e9606af
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -998,11 +998,13 @@ public void setRemoteJSDebugEnabled(final boolean isRemoteJSDebugEnabled) {
return;
}

UiThreadUtil.runOnUiThread(
() -> {
mDevSettings.setRemoteJSDebugEnabled(isRemoteJSDebugEnabled);
handleReloadJS();
});
if (mDevSettings.isRemoteJSDebugEnabled() != isRemoteJSDebugEnabled) {
UiThreadUtil.runOnUiThread(
() -> {
mDevSettings.setRemoteJSDebugEnabled(isRemoteJSDebugEnabled);
handleReloadJS();
});
}
}

@Override
Expand Down

0 comments on commit e9606af

Please sign in to comment.