From 1fbab3ad2ccb61024611dd7bde282f6a5f19f4e8 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 18 Aug 2020 15:12:56 -0700 Subject: [PATCH] Update worksace page indicator during HINT_STATE transition Test: Scroll to workspace page 2, then swipe up from the nav bar; ensure that the page indicator fades in and scrolls to page 1 Change-Id: Ie0157c8e67b94509d3817f7e160d26f505185bbb --- src/com/android/launcher3/Workspace.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 3be9ac7e07..6bfd3495e5 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -22,6 +22,7 @@ import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.FLAG_MULTI_PAGE; import static com.android.launcher3.LauncherState.FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED; import static com.android.launcher3.LauncherState.FLAG_WORKSPACE_INACCESSIBLE; +import static com.android.launcher3.LauncherState.HINT_STATE; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.SPRING_LOADED; @@ -943,7 +944,10 @@ public class Workspace extends PagedView super.onScrollChanged(l, t, oldl, oldt); // Update the page indicator progress. - boolean isTransitioning = mIsSwitchingState + // Unlike from other states, we show the page indicator when transitioning from HINT_STATE. + boolean isSwitchingState = mIsSwitchingState + && mLauncher.getStateManager().getCurrentStableState() != HINT_STATE; + boolean isTransitioning = isSwitchingState || (getLayoutTransition() != null && getLayoutTransition().isRunning()); if (!isTransitioning) { showPageIndicatorAtCurrentScroll();