From 7cc878b5aeefe06adaf0217be429b3f36a86d19b Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Wed, 18 Jul 2018 15:51:43 -0700 Subject: [PATCH] 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 --- quickstep/src/com/android/quickstep/ActivityControlHelper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java index 275075f27a..ced87542d0 100644 --- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java +++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java @@ -294,6 +294,9 @@ public interface ActivityControlHelper { 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()) {