Disable task snapshot when image size is invalid

am: d864b44295

Change-Id: Ida2e4a0407fd4731785932d1bbfc97cdbe51822b
This commit is contained in:
Juho Ha
2017-08-21 16:18:35 +00:00
committed by android-build-merger

View File

@@ -211,7 +211,7 @@ class TaskSnapshotController {
}
final GraphicBuffer buffer = top.mDisplayContent.screenshotApplicationsToBuffer(top.token,
-1, -1, false, 1.0f, false, true);
if (buffer == null) {
if (buffer == null || buffer.getWidth() <= 1 || buffer.getHeight() <= 1) {
return null;
}
return new TaskSnapshot(buffer, top.getConfiguration().orientation,