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

This commit is contained in:
Winson Chung
2017-10-12 20:34:16 +00:00
committed by Android (Google) Code Review

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