Merge "Check if mRecentsAnimationController is null before switching to screenshot" into sc-dev am: 5465527e16

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14490316

Change-Id: I684e57c21cf3772f6d8988396a7048a54fa1019b
This commit is contained in:
Tracy Zhou authored and Automerger Merge Worker committed 2021-05-11 21:44:23 +00:00
commit 9c4dafcbd6
1 file changed
+6
@@ -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);
}