Do not enable bandwidth reduction settings if key is not available
Bug: 15607413 If bandwidth reduction settings are enabled when a key is not ready yet, webview network connections stall due to a bug in M36 of chrome. Do not let it enabled via settings app. Change-Id: I7dc80c33f72ab59de68f919ef227d5227e6b923d
This commit is contained in:
@@ -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) {
|
||||
@@ -1250,8 +1254,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
||||
|
||||
private void updateWebViewDataReductionProxyOptions() {
|
||||
updateCheckBox(mWebViewDataReductionProxy, Settings.Secure.getInt(
|
||||
getActivity().getContentResolver(),
|
||||
Settings.Secure.WEBVIEW_DATA_REDUCTION_PROXY, 0) != 0);
|
||||
getActivity().getContentResolver(),
|
||||
Settings.Secure.WEBVIEW_DATA_REDUCTION_PROXY, 0) != 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user