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

Commit a218d21d authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Merge "Fix NPE in TaskSnapshotController" into oc-dev

am: 6846676b

Change-Id: Id27ee1c5147bbceddf36c3159d6fbf654ab965f7
parents e4012c4a 6846676b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -162,12 +162,15 @@ class TaskSnapshotController {
        if (top == null) {
            return null;
        }
        final WindowState mainWindow = top.findMainWindow();
        if (mainWindow == null) {
            return null;
        }
        final GraphicBuffer buffer = top.mDisplayContent.screenshotApplicationsToBuffer(top.token,
                -1, -1, false, 1.0f, false, true);
        if (buffer == null) {
            return null;
        }
        final WindowState mainWindow = top.findMainWindow();
        return new TaskSnapshot(buffer, top.getConfiguration().orientation,
                minRect(mainWindow.mContentInsets, mainWindow.mStableInsets), false /* reduced */,
                1f /* scale */);