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

Commit 1387aaec authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add an API to fetch the WebView thread."

parents ebf2577f 01673699
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -50396,6 +50396,7 @@ package android.webkit {
    method public android.graphics.Bitmap getFavicon();
    method public android.webkit.WebView.HitTestResult getHitTestResult();
    method public deprecated java.lang.String[] getHttpAuthUsernamePassword(java.lang.String, java.lang.String);
    method public android.os.Looper getLooper();
    method public java.lang.String getOriginalUrl();
    method public int getProgress();
    method public boolean getRendererPriorityWaivedWhenNotVisible();
+12 −0
Original line number Diff line number Diff line
@@ -663,6 +663,10 @@ public class WebView extends AbsoluteLayout
        if (context == null) {
            throw new IllegalArgumentException("Invalid context argument");
        }
        if (mWebViewThread == null) {
            throw new RuntimeException(
                "WebView cannot be initialized on a thread that has no Looper.");
        }
        sEnforceThreadChecking = context.getApplicationInfo().targetSdkVersion >=
                Build.VERSION_CODES.JELLY_BEAN_MR2;
        checkThread();
@@ -2422,6 +2426,14 @@ public class WebView extends AbsoluteLayout
        return getFactory().getWebViewClassLoader();
    }

    /**
     * Returns the {@link Looper} corresponding to the thread on which WebView calls must be made.
     */
    @NonNull
    public Looper getLooper() {
        return mWebViewThread;
    }

    //-------------------------------------------------------------------------
    // Interface for WebView providers
    //-------------------------------------------------------------------------