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

Commit 09aa748b authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Check if mRecentsAnimationController is null before switching to screenshot

Fixes: 187738762
Test: N/A
Change-Id: I3e24a6136a4ed6ff0b0ab810310aaf9dd9dbbb7b
parent bcf85de8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3607,6 +3607,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
     * capturing the snapshot at the same time.
     */
    public void switchToScreenshot(Runnable onFinishRunnable) {
        if (mRecentsAnimationController == null) {
            if (onFinishRunnable != null) {
                onFinishRunnable.run();
            }
            return;
        }
        switchToScreenshot(mRunningTaskId == -1 ? null
                : mRecentsAnimationController.screenshotTask(mRunningTaskId), onFinishRunnable);
    }