Fix page indicator bugs for foldable
There are bugs when unfolding the felix device where the page indicator will appear in the wrong place, and have to animate all the way back to where it should go. This was originally fixed with ag/24399441 but it seems that the issue is still happening when flag FOLDABLE_SINGLE_PAGE is off. Here we fix that issue..
Fix: 294231977
Fix: 291822492
Flag: NONE
Test: n/a
Change-Id: I6ae97ebbb034f5b520a4f5ace729b44b89ea73a0
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 9255ff4..e77ed9f 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2120,7 +2120,7 @@
@Override
public void bindScreens(IntArray orderedScreenIds) {
- mWorkspace.mPageIndicator.setAreScreensBinding(true);
+ mWorkspace.mPageIndicator.setAreScreensBinding(true, mDeviceProfile.isTwoPanels);
int firstScreenPosition = 0;
if ((FeatureFlags.QSB_ON_FIRST_SCREEN
&& mIsFirstPagePinnedItemEnabled
@@ -2649,7 +2649,7 @@
TraceHelper.INSTANCE.endSection();
mWorkspace.removeExtraEmptyScreen(/* stripEmptyScreens= */ true);
- mWorkspace.mPageIndicator.setAreScreensBinding(false);
+ mWorkspace.mPageIndicator.setAreScreensBinding(false, mDeviceProfile.isTwoPanels);
}
private boolean canAnimatePageChange() {