Add null check before playing recents scale down anim
When swiping up to overview from an app, we scale down RecentsView in
launcher, synchronized with the app window. In rare cases, however,
there may not be any TaskViews in launcher, so we should just ignore
the launcher component in this case. For example, this happens in
LockTask mode.
Bug: 110703110
Change-Id: Ib6f836581a3e12babf4e26e272b77bb529f86fd4
diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
index 275075f..ced8754 100644
--- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java
+++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
@@ -294,6 +294,9 @@
private void playScaleDownAnim(AnimatorSet anim, Launcher launcher) {
RecentsView recentsView = launcher.getOverviewPanel();
TaskView v = recentsView.getTaskViewAt(recentsView.getCurrentPage());
+ if (v == null) {
+ return;
+ }
ClipAnimationHelper clipHelper = new ClipAnimationHelper();
clipHelper.fromTaskThumbnailView(v.getThumbnail(), (RecentsView) v.getParent(), null);
if (!clipHelper.getSourceRect().isEmpty() && !clipHelper.getTargetRect().isEmpty()) {