Fixing workspace card shifted when going to home.
When animating the wrospace, we skip the properties if for start and end are same.
But after creating the animation, if the property changes, the final property is
never applied.
Bug: 72257542
Change-Id: Id408c7820476273958e835ae99a3a934ad5a4700
diff --git a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
index 9ea30f0..9a5640b 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
@@ -71,6 +71,8 @@
.getBoolean("pref_scroll_to_first_task", false);
mIsRecentsScrollingToFirstTask = mLauncher.isInState(NORMAL) && toState == OVERVIEW
&& settingEnabled;
+ // TODO: Instead of animating the workspace translationX, move the contents
+ mWorkspaceCard.setWorkspaceScrollingEnabled(mIsRecentsScrollingToFirstTask);
// Scroll to the workspace card before changing to the NORMAL state.
int currPage = mRecentsView.getCurrentPage();
@@ -89,11 +91,6 @@
progressAnim.addListener(new AnimationSuccessListener() {
@Override
- public void onAnimationStart(Animator animation) {
- mWorkspaceCard.setWorkspaceScrollingEnabled(mIsRecentsScrollingToFirstTask);
- }
-
- @Override
public void onAnimationSuccess(Animator animator) {
mWorkspaceCard.setWorkspaceScrollingEnabled(toState == OVERVIEW);
mRecentsView.setCurrentPage(mRecentsView.getPageNearestToCenterOfScreen());