Merge "Gray out the selection while the key is not available."
This commit is contained in:
@@ -359,8 +359,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
mWebViewDataReductionProxy = findAndInitCheckboxPref(WEBVIEW_DATA_REDUCTION_PROXY_KEY);
|
mWebViewDataReductionProxy = findAndInitCheckboxPref(WEBVIEW_DATA_REDUCTION_PROXY_KEY);
|
||||||
String key = Settings.Global.getString(getActivity().getContentResolver(),
|
String key = Settings.Global.getString(getActivity().getContentResolver(),
|
||||||
Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY);
|
Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY);
|
||||||
// Make it not selectable if the key is not available for some reason.
|
// Disable the selection if the key is not available for some reason.
|
||||||
mWebViewDataReductionProxy.setSelectable(key != null && !key.isEmpty());
|
if (key == null || key.isEmpty()) {
|
||||||
|
disableForUser(mWebViewDataReductionProxy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ListPreference addListPreference(String prefKey) {
|
private ListPreference addListPreference(String prefKey) {
|
||||||
|
Reference in New Issue
Block a user