Merge "Delegate multiprocess flag to WebView update service."
This commit is contained in:
committed by
Android (Google) Code Review
commit
09989dd2ca
@@ -865,20 +865,16 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateWebViewMultiprocessOptions() {
|
private void updateWebViewMultiprocessOptions() {
|
||||||
updateSwitchPreference(mWebViewMultiprocess,
|
try {
|
||||||
Settings.Global.getInt(getActivity().getContentResolver(),
|
updateSwitchPreference(mWebViewMultiprocess,
|
||||||
Settings.Global.WEBVIEW_MULTIPROCESS, 0) != 0);
|
mWebViewUpdateService.isMultiProcessEnabled());
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeWebViewMultiprocessOptions() {
|
private void writeWebViewMultiprocessOptions() {
|
||||||
boolean value = mWebViewMultiprocess.isChecked();
|
|
||||||
Settings.Global.putInt(getActivity().getContentResolver(),
|
|
||||||
Settings.Global.WEBVIEW_MULTIPROCESS, value ? 1 : 0);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String wv_package = mWebViewUpdateService.getCurrentWebViewPackageName();
|
mWebViewUpdateService.enableMultiProcess(mWebViewMultiprocess.isChecked());
|
||||||
ActivityManager.getService().killPackageDependents(
|
|
||||||
wv_package, UserHandle.USER_ALL);
|
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user