Skip drawing snapshot if we can't create the buffer.
Bug: 63436798 Test: Only a NPE check Change-Id: I1c87d9dfcf828e3c7d4fb070e7492834761224e7
This commit is contained in:
@@ -296,7 +296,9 @@ class TaskSnapshotController {
|
||||
decorPainter.drawDecors(c, null /* statusBarExcludeFrame */);
|
||||
node.end(c);
|
||||
final Bitmap hwBitmap = ThreadedRenderer.createHardwareBitmap(node, width, height);
|
||||
|
||||
if (hwBitmap == null) {
|
||||
return null;
|
||||
}
|
||||
return new TaskSnapshot(hwBitmap.createGraphicBufferHandle(),
|
||||
topChild.getConfiguration().orientation, mainWindow.mStableInsets,
|
||||
ActivityManager.isLowRamDeviceStatic() /* reduced */, 1.0f /* scale */);
|
||||
|
||||
Reference in New Issue
Block a user