Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b26428b3 authored by Torne (Richard Coles)'s avatar Torne (Richard Coles)
Browse files

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
parent 83d57758
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
  }
+12 −0
Original line number Diff line number Diff line
@@ -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();
        }
    }
}