Merge "Do not enable bandwidth reduction settings if key is not available"

This commit is contained in:
Selim Gurun
2014-06-17 00:25:01 +00:00
committed by Android (Google) Code Review

View File

@@ -358,6 +358,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
mAllPrefs.add(mProcessStats);
mWebViewDataReductionProxy = findAndInitCheckboxPref(WEBVIEW_DATA_REDUCTION_PROXY_KEY);
String key = Settings.Global.getString(getActivity().getContentResolver(),
Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY);
// Make it not selectable if the key is not available for some reason.
mWebViewDataReductionProxy.setSelectable(key != null && !key.isEmpty());
}
private ListPreference addListPreference(String prefKey) {