mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1156546 - Remove "Developer Tools" preference category when in Guest Mode. r=liuche
This commit is contained in:
parent
4dbb23b545
commit
b83577f5d5
@ -127,9 +127,11 @@ OnSharedPreferenceChangeListener
|
||||
public static final String PREFS_OPEN_URLS_IN_PRIVATE = NON_PREF_PREFIX + "openExternalURLsPrivately";
|
||||
public static final String PREFS_VOICE_INPUT_ENABLED = NON_PREF_PREFIX + "voice_input_enabled";
|
||||
public static final String PREFS_QRCODE_ENABLED = NON_PREF_PREFIX + "qrcode_enabled";
|
||||
private static final String PREFS_DEVTOOLS = NON_PREF_PREFIX + "devtools.enabled";
|
||||
|
||||
private static final String ACTION_STUMBLER_UPLOAD_PREF = AppConstants.ANDROID_PACKAGE_NAME + ".STUMBLER_PREF";
|
||||
|
||||
|
||||
// This isn't a Gecko pref, even if it looks like one.
|
||||
private static final String PREFS_BROWSER_LOCALE = "locale";
|
||||
|
||||
@ -692,6 +694,13 @@ OnSharedPreferenceChangeListener
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (PREFS_DEVTOOLS.equals(key) &&
|
||||
RestrictedProfiles.isUserRestricted()) {
|
||||
preferences.removePreference(pref);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
|
||||
setupPreferences((PreferenceGroup) pref, prefs);
|
||||
} else {
|
||||
pref.setOnPreferenceChangeListener(this);
|
||||
|
@ -55,7 +55,8 @@
|
||||
|
||||
<PreferenceScreen android:title="@string/pref_category_devtools"
|
||||
android:summary="@string/pref_developer_remotedebugging"
|
||||
android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment" >
|
||||
android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment"
|
||||
android:key="android.not_a_preference.devtools.enabled" >
|
||||
<extra android:name="resource"
|
||||
android:value="preferences_devtools"/>
|
||||
</PreferenceScreen>
|
||||
|
@ -72,7 +72,8 @@
|
||||
</intent>
|
||||
</PreferenceScreen>
|
||||
<PreferenceScreen android:title="@string/pref_category_devtools"
|
||||
android:summary="@string/pref_developer_remotedebugging" >
|
||||
android:summary="@string/pref_developer_remotedebugging"
|
||||
android:key="android.not_a_preference.devtools.enabled" >
|
||||
<intent android:action="android.intent.action.VIEW"
|
||||
android:targetPackage="@string/android_package_name"
|
||||
android:targetClass="org.mozilla.gecko.preferences.GeckoPreferences" >
|
||||
|
Loading…
Reference in New Issue
Block a user