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

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

Make the long-deprecated detachDrawGlFunctor a no-op.

WebViewDelegate.detachDrawGlFunctor has been deprecated for a long time
and is never used by any version of WebView that can run on current
Android versions. Make it a no-op like the other deprecated draw functor
methods, to remove the dependency on the hidden ViewRootImpl class.

Bug: 310653407
Test: atest CtsWebkitTestCases
Flag: android.webkit.mainline_apis
Change-Id: I863e8f33ef2004cab4da57daddcdc49a92009991
parent af00cc73
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -137,11 +137,15 @@ public final class WebViewDelegate {
     */
    @Deprecated
    public void detachDrawGlFunctor(View containerView, long nativeDrawGLFunctor) {
        if (Flags.mainlineApis()) {
            throw new UnsupportedOperationException();
        } else {
            ViewRootImpl viewRootImpl = containerView.getViewRootImpl();
            if (nativeDrawGLFunctor != 0 && viewRootImpl != null) {
                viewRootImpl.detachFunctor(nativeDrawGLFunctor);
            }
        }
    }

    /**
     * Returns the package id of the given {@code packageName}.