diff options
Diffstat (limited to 'quickstep')
-rw-r--r-- | quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java index f1d6450a5..1c6696858 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java @@ -64,10 +64,12 @@ public class BackgroundAppState extends OverviewState { public ScaleAndTranslation getOverviewScaleAndTranslation(Launcher launcher) { // Initialize the recents view scale to what it would be when starting swipe up RecentsView recentsView = launcher.getOverviewPanel(); - if (recentsView.getTaskViewCount() == 0) { + int taskCount = recentsView.getTaskViewCount(); + if (taskCount == 0) { return super.getOverviewScaleAndTranslation(launcher); } - TaskView dummyTask = recentsView.getTaskViewAt(recentsView.getCurrentPage()); + TaskView dummyTask = recentsView.getTaskViewAt(Math.max(taskCount - 1, + recentsView.getCurrentPage())); return recentsView.getTempClipAnimationHelper().updateForFullscreenOverview(dummyTask) .getScaleAndTranslation(); } |