Merge "Gray out the selection while the key is not available."

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

View File

@@ -359,8 +359,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
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());
// Disable the selection if the key is not available for some reason.
if (key == null || key.isEmpty()) {
disableForUser(mWebViewDataReductionProxy);
}
}
private ListPreference addListPreference(String prefKey) {