check surface valid before screenshotting wallapper
Fixes: 214410335 Test: manual` Change-Id: Ief56edec17a3540d8747694bc77764e2ab55c24f
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user