Gray out the selection while the key is not available.
Bug: 15607413 The old logic was simply making it not selectable. This will disable it and gray it out providing better feedback. Change-Id: Iaeaae43f28100ba1a1550db0a919172a249054e8
This commit is contained in:
@@ -360,8 +360,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) {
|
||||
|
Reference in New Issue
Block a user