Merge "Disable task snapshot when image size is invalid"
This commit is contained in:
committed by
Android (Google) Code Review
commit
40e9cce7eb
@@ -204,7 +204,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,
|
||||
|
||||
Reference in New Issue
Block a user