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

Commit ff5e6eb7 authored by Wu Ahan's avatar Wu Ahan Committed by Android (Google) Code Review
Browse files

Merge "Validate if the surface of wallpaper is valid before creating EglSurface."

parents 61b4e713 0b272833
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@ public class EglHelper {
            Log.d(TAG, "createEglSurface start");
        }

        if (hasEglDisplay()) {
        if (hasEglDisplay() && surfaceHolder.getSurface().isValid()) {
            int[] attrs = null;
            int wcgCapability = getWcgCapability();
            if (wcg && checkExtensionCapability(KHR_GL_COLOR_SPACE) && wcgCapability > 0) {
@@ -214,7 +214,8 @@ public class EglHelper {
            }
            mEglSurface = eglCreateWindowSurface(mEglDisplay, mEglConfig, surfaceHolder, attrs, 0);
        } else {
            Log.w(TAG, "mEglDisplay is null");
            Log.w(TAG, "Create EglSurface failed: hasEglDisplay=" + hasEglDisplay()
                    + ", has valid surface=" + surfaceHolder.getSurface().isValid());
            return false;
        }