Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6267f995 authored by Winson Chung's avatar Winson Chung
Browse files

Skip drawing snapshot if we can't create the buffer.

Bug: 63436798
Test: Only a NPE check
Change-Id: I1c87d9dfcf828e3c7d4fb070e7492834761224e7
parent 7c112b73
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 */);