Show overview as grid in fallback recents

- Replace mShowAsGrid with state specific mOverviewGridEnabled and mCurrentGestureEndTarget
- Avoid showing invisible home task in grid
- Fix quick switch out of orientation in fallback recents
- Add a HOME state to switch to when starting home, to avoid showing grid overview briefly in quick switch
- Separate clear all button and overview actions handling
- Always maintain first task's fullscreen translation at 0 to avoid jumping when mOverviewFullscreenEnabled changes
- Moved fullscreenTranslation calculation to RecentsView
- Added GestureEndTarget -> BaseState translation to allow querying displayOverviewAsGrid for a displayOverviewTasksAsGrid

Bug: 174464863
Test: Launch overveiw from home, launch overveiw from app, launch into app, test for both small and large screens
Change-Id: Iee06d94d3067ea45cadd2051717223ddc0e6e70c
This commit is contained in:
Alex Chau
2021-03-11 20:16:54 +00:00
parent 2b30076aba
commit ecd12b32c9
19 changed files with 222 additions and 97 deletions
@@ -150,6 +150,8 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher>
@Override
public void onStateTransitionStart(LauncherState toState) {
setOverviewStateEnabled(toState.overviewUi);
setOverviewGridEnabled(toState.displayOverviewTasksAsGrid(mActivity.getDeviceProfile()));
setOverviewFullscreenEnabled(toState.getOverviewFullscreenProgress() == 1);
setFreezeViewVisibility(true);
}
@@ -160,8 +162,6 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher>
reset();
}
setOverlayEnabled(finalState == OVERVIEW || finalState == OVERVIEW_MODAL_TASK);
setOverviewGridEnabled(finalState.displayOverviewTasksAsGrid(mActivity));
setOverviewFullscreenEnabled(finalState.getOverviewFullscreenProgress() == 1);
setFreezeViewVisibility(false);
}