Merge "Skip drawing snapshot if we can't create the buffer." into oc-mr1-dev

am: 44e1d4eb3c

Change-Id: Ia7e02905e030a1b3ef3841e5b77d49006b764b0f
This commit is contained in:
Winson Chung
2017-10-12 20:48:34 +00:00
committed by android-build-merger

View File

@@ -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 */);