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

Commit 5465527e authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "Check if mRecentsAnimationController is null before switching to screenshot" into sc-dev

parents a7cc2cbd 09aa748b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3635,6 +3635,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);
    }