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

Commit ed94e992 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE if display is off and then removed" into sc-dev

parents 476d1d45 31e9ca61
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -646,8 +646,12 @@ class TaskSnapshotController {
        if (shouldDisableSnapshots()) {
            return;
        }
        final DisplayContent displayContent = mService.mRoot.getDisplayContent(displayId);
        if (displayContent == null) {
            return;
        }
        mTmpTasks.clear();
        mService.mRoot.getDisplayContent(displayId).forAllTasks(task -> {
        displayContent.forAllTasks(task -> {
            // Since RecentsAnimation will handle task snapshot while switching apps with the best
            // capture timing (e.g. IME window capture), No need additional task capture while task
            // is controlled by RecentsAnimation.