Merge "Properly remove experimental WebView preference when unavailable." into jb-mr2-dev

This commit is contained in:
Ben Murdoch
2013-04-09 19:00:41 +00:00
committed by Android (Google) Code Review

View File

@@ -123,6 +123,8 @@ public class DevelopmentSettings extends PreferenceFragment
private static final String ANIMATOR_DURATION_SCALE_KEY = "animator_duration_scale";
private static final String OVERLAY_DISPLAY_DEVICES_KEY = "overlay_display_devices";
private static final String DEBUG_DEBUGGING_CATEGORY_KEY = "debug_debugging_category";
private static final String DEBUG_APPLICATIONS_CATEGORY_KEY = "debug_applications_category";
private static final String OPENGL_TRACES_KEY = "enable_opengl_traces";
private static final String IMMEDIATELY_DESTROY_ACTIVITIES_KEY
@@ -283,8 +285,10 @@ public class DevelopmentSettings extends PreferenceFragment
mExperimentalWebView = findAndInitCheckboxPref(WEBVIEW_EXPERIMENTAL_KEY);
} else {
Preference experimentalWebView = findPreference(WEBVIEW_EXPERIMENTAL_KEY);
if (experimentalWebView != null) {
getPreferenceScreen().removePreference(experimentalWebView);
PreferenceGroup debugApplicationsCategory = (PreferenceGroup)
findPreference(DEBUG_APPLICATIONS_CATEGORY_KEY);
if (debugApplicationsCategory != null) {
debugApplicationsCategory.removePreference(experimentalWebView);
}
}