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

Commit 80122c2a authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Prevent crash in VPN settings Bug #5217245"

parents 87a4d87e eca9b1f5
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -413,8 +413,8 @@ public abstract class HardwareRenderer {
                if (error != EGL_SUCCESS) {
                    // something bad has happened revert to
                    // normal rendering.
                    fallback(error != EGL11.EGL_CONTEXT_LOST);
                    Log.w(LOG_TAG, "EGL error: " + GLUtils.getEGLErrorString(error));
                    fallback(error != EGL11.EGL_CONTEXT_LOST);
                }
            }
        }
@@ -702,9 +702,10 @@ public abstract class HardwareRenderer {

        @Override
        void setup(int width, int height) {
            checkCurrent();
            if (validate()) {
                mCanvas.setViewport(width, height);
            }
        }

        boolean canDraw() {
            return mGl != null && mCanvas != null;
+1 −1
Original line number Diff line number Diff line
@@ -1352,7 +1352,7 @@ public final class ViewRootImpl extends Handler implements ViewParent,
                    mAttachInfo.mHardwareRenderer != null &&
                    mAttachInfo.mHardwareRenderer.isEnabled())) {
                mAttachInfo.mHardwareRenderer.setup(mWidth, mHeight);
                if (!hwInitialized) {
                if (!hwInitialized && mAttachInfo.mHardwareRenderer.isEnabled()) {
                    mAttachInfo.mHardwareRenderer.invalidate(mHolder);
                }
            }