mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-04 09:27:53 +08:00
Add react dev menu setting for cpp deltas
Summary: Adds a menu item to enable handling of JS module deltas in native code. The check box is dependent on JS Deltas being activated in the first place. Reviewed By: cpojer Differential Revision: D7380167 fbshipit-source-id: 3001d12140542b4e52b1ce96be3c5f56e52a15f8
This commit is contained in:
committed by
Facebook Github Bot
parent
be379efc9b
commit
e8662a2123
@@ -30,6 +30,7 @@ public class DevInternalSettings implements
|
||||
private static final String PREFS_JS_DEV_MODE_DEBUG_KEY = "js_dev_mode_debug";
|
||||
private static final String PREFS_JS_MINIFY_DEBUG_KEY = "js_minify_debug";
|
||||
private static final String PREFS_JS_BUNDLE_DELTAS_KEY = "js_bundle_deltas";
|
||||
private static final String PREFS_JS_BUNDLE_DELTAS_CPP_KEY = "js_bundle_deltas_cpp";
|
||||
private static final String PREFS_ANIMATIONS_DEBUG_KEY = "animations_debug";
|
||||
private static final String PREFS_RELOAD_ON_JS_CHANGE_KEY = "reload_on_js_change";
|
||||
private static final String PREFS_INSPECTOR_DEBUG_KEY = "inspector_debug";
|
||||
@@ -83,6 +84,7 @@ public class DevInternalSettings implements
|
||||
|| PREFS_RELOAD_ON_JS_CHANGE_KEY.equals(key)
|
||||
|| PREFS_JS_DEV_MODE_DEBUG_KEY.equals(key)
|
||||
|| PREFS_JS_BUNDLE_DELTAS_KEY.equals(key)
|
||||
|| PREFS_JS_BUNDLE_DELTAS_CPP_KEY.equals(key)
|
||||
|| PREFS_JS_MINIFY_DEBUG_KEY.equals(key)) {
|
||||
mListener.onInternalSettingsChanged();
|
||||
}
|
||||
@@ -123,6 +125,16 @@ public class DevInternalSettings implements
|
||||
mPreferences.edit().putBoolean(PREFS_JS_BUNDLE_DELTAS_KEY, enabled).apply();
|
||||
}
|
||||
|
||||
@SuppressLint("SharedPreferencesUse")
|
||||
public boolean isBundleDeltasCppEnabled() {
|
||||
return mPreferences.getBoolean(PREFS_JS_BUNDLE_DELTAS_CPP_KEY, false);
|
||||
}
|
||||
|
||||
@SuppressLint("SharedPreferencesUse")
|
||||
public void setBundleDeltasCppEnabled(boolean enabled) {
|
||||
mPreferences.edit().putBoolean(PREFS_JS_BUNDLE_DELTAS_CPP_KEY, enabled).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNuclideJSDebugEnabled() {
|
||||
return ReactBuildConfig.IS_INTERNAL_BUILD && ReactBuildConfig.DEBUG;
|
||||
|
||||
Reference in New Issue
Block a user