Expose isMultiProcessEnabled via WebViewDelegate.
Allow the WebView implementation to call isMultiProcessEnabled via the delegate, so that it doesn't have to fetch and interpret the value of the system setting itself. Bug: 21643067 Test: manual (requires modifications to chromium to call) Change-Id: I1ef2b7ea0054c606965040e02034c938d5e6464c
This commit is contained in:
@@ -50585,6 +50585,7 @@ package android.webkit {
|
||||
method public java.lang.String getErrorString(android.content.Context, int);
|
||||
method public int getPackageId(android.content.res.Resources, java.lang.String);
|
||||
method public void invokeDrawGlFunctor(android.view.View, long, boolean);
|
||||
method public boolean isMultiProcessEnabled();
|
||||
method public boolean isTraceTagEnabled();
|
||||
method public void setOnTraceEnabledChangeListener(android.webkit.WebViewDelegate.OnTraceEnabledChangeListener);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.Trace;
|
||||
import android.util.SparseArray;
|
||||
@@ -206,4 +207,15 @@ public final class WebViewDelegate {
|
||||
appInfo.getBaseResourcePath(), newAssetPath);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether WebView should run in multiprocess mode.
|
||||
*/
|
||||
public boolean isMultiProcessEnabled() {
|
||||
try {
|
||||
return WebViewFactory.getUpdateService().isMultiProcessEnabled();
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user