Improve quick switch from home to taskbar

- Add LauncherState#isTaskbarAlignedWithHotseat() which defaults to !isTaskbarStashed(), but is always false for quick switch from home
- Replaced FLAG_TRANSITION_STATE_START_STASHED and FLAG_TRANSITION_STATE_COMMITTED_STASHED with FLAG_STATE_TRANSITION_RUNNING and a reference to mLauncherState. STATE_START is equivalent to TRANSITION_RUNNING changing to true, and STATE_COMMITTED is equivalent to TRANSITION_RUNNING changing to false. Then can get details from the state such as whether taskbar is stashed and icon alignment from mLauncherState

Test: quick switch from home, both with taskbar stashed in apps and not
Fixes: 194728611
Bug: 204657916
Change-Id: I6cf84ec73a4036e14cc7268667c6f62100884c27
This commit is contained in:
Tony Wickham
2021-11-24 15:43:52 -08:00
parent 9566290e13
commit 24675d36b7
7 changed files with 68 additions and 36 deletions
@@ -629,7 +629,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
* this doesn't get adjusted to reflect the new child count after the taskView is dismissed/
* removed from recentsView
*/
private int mSplitHiddenTaskViewIndex;
private int mSplitHiddenTaskViewIndex = -1;
@Nullable
private FloatingTaskView mFirstFloatingTaskView;
@Nullable
@@ -3959,6 +3959,9 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
/** TODO(b/181707736) More gracefully handle exiting split selection state */
private void resetFromSplitSelectionState() {
if (mSplitHiddenTaskViewIndex == -1) {
return;
}
if (!mActivity.getDeviceProfile().overviewShowAsGrid) {
int pageToSnapTo = mCurrentPage;
if (mSplitHiddenTaskViewIndex <= pageToSnapTo) {