Fix tabs abruptly reset during swipe
The indicator position has already been updated by
PersonalWorkPagedView#onScrollChanged. The updateIndicatorPosition
call in setActiveMarker has abruptly reset the mScrollOffset to a page
index rather than a [0f, 1f] offset.
Test: On a work profile device, swipe left & right in the all apps.
Then, swipe left & right in the full widgets picker. In both
cases, I no longer observe an abruptly reset of the tabs
transition animation.
Bug: 187704466
Change-Id: I53c4ed3a98219093f3d61dfa4de2fe21ec88851c
diff --git a/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java b/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java
index c7cbde8..8f9cdc8 100644
--- a/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java
+++ b/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java
@@ -127,7 +127,6 @@
public void setActiveMarker(int activePage) {
updateTabTextColor(activePage);
if (mOnActivePageChangedListener != null && mLastActivePage != activePage) {
- updateIndicatorPosition(activePage);
mOnActivePageChangedListener.onActivePageChanged(activePage);
}
mLastActivePage = activePage;