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

Commit fc18306c authored by Todd Lee's avatar Todd Lee
Browse files

Ensure wallpaper surface is valid (not released) before dimming

Flag: NONE - just adding surface validation check
Bug: b/324659948
Test: check wallpaper detach/no crash
Change-Id: If991d255f7d3962661c94d4f626524b4012d29ab
parent 8bdef1f0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1025,7 +1025,8 @@ public abstract class WallpaperService extends Service {
            mWallpaperDimAmount = (!mShouldDimByDefault) ? mCustomDimAmount
                    : Math.max(mDefaultDimAmount, mCustomDimAmount);

            if (!ENABLE_WALLPAPER_DIMMING || mBbqSurfaceControl == null
            if (!ENABLE_WALLPAPER_DIMMING
                    || mBbqSurfaceControl == null || !mBbqSurfaceControl.isValid()
                    || mWallpaperDimAmount == mPreviousWallpaperDimAmount) {
                return;
            }