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

Commit 579f4e93 authored by John Reck's avatar John Reck
Browse files

Fix crash in setNewPicture

 Bug: 6412902

Change-Id: I65d8f65839c6e84440cb9d0393c35a8c488c9781
parent 2c9ae753
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ import android.view.View.MeasureSpec;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.ViewRootImpl;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
@@ -7885,14 +7886,14 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
        mSendScrollEvent = true;

        int functor = 0;
        if (mWebView.isHardwareAccelerated()
                || mWebView.getLayerType() != View.LAYER_TYPE_HARDWARE) {
        ViewRootImpl viewRoot = mWebView.getViewRootImpl();
        if (mWebView.isHardwareAccelerated() && viewRoot != null) {
            functor = nativeGetDrawGLFunction(mNativeClass);
            viewRoot.attachFunctor(functor);
        }

        if (functor != 0) {
            mWebView.getViewRootImpl().attachFunctor(functor);
        } else {
        if (functor == 0
                || mWebView.getLayerType() != View.LAYER_TYPE_NONE) {
            // invalidate the screen so that the next repaint will show new content
            // TODO: partial invalidate
            mWebView.invalidate();