Swipe up from nav bar in OVERVIEW or ALL_APPS to go home

Add NavBarToHomeTouchController, which intercepts touches from the nav bar
region when in overview or all apps.

Swiping up from all apps translates it up and slightly fades out app icons,
then letting go springs towards home screen.

Swiping up from overview translates it to the right, then letting go springs
towards the left where it lives in the home state.

Both cases have a strong deceleration while swiping.

Bug: 129571305
Bug: 111926330
Change-Id: I5b7de05f15f0300233343fa2d69fcad624e070f8
This commit is contained in:
Tony
2019-03-27 14:09:55 -05:00
parent 1ac6c84bda
commit e243a9493e
3 changed files with 146 additions and 2 deletions

View File

@@ -224,7 +224,8 @@ public abstract class AbstractStateChangeTouchController
return true;
}
private boolean goingBetweenNormalAndOverview(LauncherState fromState, LauncherState toState) {
protected boolean goingBetweenNormalAndOverview(LauncherState fromState,
LauncherState toState) {
return (fromState == NORMAL || fromState == OVERVIEW)
&& (toState == NORMAL || toState == OVERVIEW)
&& mPendingAnimation == null;
@@ -242,7 +243,7 @@ public abstract class AbstractStateChangeTouchController
mStartContainerType = LauncherLogProto.ContainerType.ALLAPPS;
} else if (mStartState == NORMAL) {
mStartContainerType = getLogContainerTypeForNormalState();
} else if (mStartState == OVERVIEW){
} else if (mStartState == OVERVIEW){
mStartContainerType = LauncherLogProto.ContainerType.TASKSWITCHER;
}
if (mCurrentAnimation == null) {