diff options
author | Tony Wickham <twickham@google.com> | 2018-07-18 15:51:43 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2018-07-18 15:51:43 -0700 |
commit | 7cc878b5aeefe06adaf0217be429b3f36a86d19b (patch) | |
tree | e37c77a5649ed4c256ff3b031b151720b08c9327 | |
parent | 00fec0d53b7f5ef08f0382337b3b028ca5eb1de2 (diff) | |
download | android_packages_apps_Trebuchet-7cc878b5aeefe06adaf0217be429b3f36a86d19b.tar.gz android_packages_apps_Trebuchet-7cc878b5aeefe06adaf0217be429b3f36a86d19b.tar.bz2 android_packages_apps_Trebuchet-7cc878b5aeefe06adaf0217be429b3f36a86d19b.zip |
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
-rw-r--r-- | quickstep/src/com/android/quickstep/ActivityControlHelper.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java index 275075f27..ced87542d 100644 --- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java +++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java @@ -294,6 +294,9 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> { 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()) { |