mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
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
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user