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

Commit ad09fa8b authored by Jay Aliomer's avatar Jay Aliomer
Browse files

check surface valid before screenshotting wallapper

Fixes: 214410335
Test: manual`
Change-Id: Ief56edec17a3540d8747694bc77764e2ab55c24f
parent ca5641d3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1587,6 +1587,7 @@ public abstract class WallpaperService extends Service {
                return;
            }
            Surface surface = mSurfaceHolder.getSurface();
            if (!surface.isValid()) return;
            boolean widthIsLarger = mSurfaceSize.x > mSurfaceSize.y;
            int smaller = widthIsLarger ? mSurfaceSize.x
                    : mSurfaceSize.y;