Merge "Fixing workspace card shifted when going to home." into ub-launcher3-master

This commit is contained in:
TreeHugger Robot
2018-02-10 00:55:00 +00:00
committed by Android (Google) Code Review
@@ -71,6 +71,8 @@ public class RecentsViewStateController implements StateHandler {
.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();
@@ -88,11 +90,6 @@ public class RecentsViewStateController implements StateHandler {
progressAnim.setInterpolator(Interpolators.LINEAR);
progressAnim.addListener(new AnimationSuccessListener() {
@Override
public void onAnimationStart(Animator animation) {
mWorkspaceCard.setWorkspaceScrollingEnabled(mIsRecentsScrollingToFirstTask);
}
@Override
public void onAnimationSuccess(Animator animator) {
mWorkspaceCard.setWorkspaceScrollingEnabled(toState == OVERVIEW);