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

Commit d65eea6b authored by Aurélien Pomini's avatar Aurélien Pomini Committed by Android (Google) Code Review
Browse files

Merge "Lock mSurfaceHolder=null in ImageWallpaper" into main

parents 869b2f61 cda765dd
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -210,8 +210,14 @@ public class ImageWallpaper extends WallpaperService {
            if (DEBUG) {
                Log.i(TAG, "onSurfaceDestroyed");
            }
            mLongExecutor.execute(this::onSurfaceDestroyedSynchronized);
        }

        private void onSurfaceDestroyedSynchronized() {
            synchronized (mLock) {
                mSurfaceHolder = null;
            }
        }

        @Override
        public void onSurfaceCreated(SurfaceHolder holder) {
@@ -241,7 +247,7 @@ public class ImageWallpaper extends WallpaperService {

        private void drawFrameInternal() {
            if (mSurfaceHolder == null) {
                Log.e(TAG, "attempt to draw a frame without a valid surface");
                Log.i(TAG, "attempt to draw a frame without a valid surface");
                return;
            }