When overview appears from motion pause, come up from bottom

- Add vertical offset calculations to RecentsView (in addition to
  the existing horizontal offset which has been renamed accordingly).
- LauncherState#getOverviewScaleAndOffset() now supports both
  horizontal and vertical offsets and is specified such that overview
  appears and disappears from the bottom of the screen rather than the
  side.
- Quick switch still uses horizontal offset to come from the side.
- No longer need to scroll to page 0 when translating offscreen.
- Update interpolators for overview to home transition.
- Align 2 button mode transition with 0 button mode.

Test: Visually checking all of these. As appropriate, repeat in 0, 2, 3
button modes, landscape/portrait/fake landscape, and 3P launcher
- Quick switch from home
- Home to overview
- Overview to home (swipe up)
- Overview to home (tap outside)
- Overview to home (back invocation)
- Quick switch from app
- Swipe up and hold from app
- Dismiss an app
- Empty recents
- Split select state to home
- Modal state to home

Bug: 185411781
Change-Id: Ic59b877ccc0050afd7cd478778e9eeb60e2e47f7
This commit is contained in:
Tony Wickham
2021-04-14 13:50:04 -07:00
parent bb3460c01f
commit e8b22d5e60
18 changed files with 196 additions and 102 deletions

View File

@@ -19,6 +19,7 @@ import static com.android.launcher3.AbstractFloatingView.TYPE_ALL;
import static com.android.launcher3.AbstractFloatingView.TYPE_HIDE_BACK_BUTTON;
import static com.android.launcher3.LauncherState.FLAG_HIDE_BACK_BUTTON;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.NO_OFFSET;
import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.quickstep.SysUINavigationMode.Mode.TWO_BUTTONS;
@@ -343,7 +344,7 @@ public abstract class BaseQuickstepLauncher extends Launcher
@Override
public float[] getNormalOverviewScaleAndOffset() {
return SysUINavigationMode.getMode(this).hasGestures
? new float[] {1, 1} : new float[] {1.1f, 0};
? new float[] {1, NO_OFFSET, 1} : new float[] {1.1f, NO_OFFSET, NO_OFFSET};
}
@Override