Fix 2 bugs involving split staging task translation am: 978b0021a9

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20087546

Change-Id: Iffca62d17d40b168ff53c5624dc09dda2fbe4fec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jeremy Sim
2022-10-01 01:23:06 +00:00
committed by Automerger Merge Worker
5 changed files with 14 additions and 9 deletions
@@ -130,10 +130,11 @@ public final class RecentsViewStateController extends
mRecentsView.createSplitSelectInitAnimation(builder,
toState.getTransitionDuration(mLauncher, true /* isToState */));
// Add properties to shift remaining taskViews to get out of placeholder view
// Shift tasks vertically downward to get out of placeholder view
builder.setFloat(mRecentsView, taskViewsFloat.first,
toState.getSplitSelectTranslation(mLauncher),
timings.getGridSlidePrimaryInterpolator());
// Zero out horizontal translation
builder.setFloat(mRecentsView, taskViewsFloat.second,
0,
timings.getGridSlideSecondaryInterpolator());
@@ -16,6 +16,9 @@
package com.android.quickstep.util;
import static com.android.launcher3.anim.Interpolators.EMPHASIZED;
import static com.android.launcher3.anim.Interpolators.INSTANT;
import android.view.animation.Interpolator;
/**
@@ -44,14 +47,14 @@ abstract class OverviewToSplitTimings implements SplitAnimationTimings {
public int getInstructionsTextFadeInEnd() { return 300; }
public int getInstructionsUnfoldStart() { return 167; }
public int getInstructionsUnfoldEnd() { return 500; }
public Interpolator getGridSlidePrimaryInterpolator() { return EMPHASIZED; }
public Interpolator getGridSlideSecondaryInterpolator() { return INSTANT; }
abstract public int getDuration();
abstract public Interpolator getStagedRectXInterpolator();
abstract public Interpolator getStagedRectYInterpolator();
abstract public Interpolator getStagedRectScaleXInterpolator();
abstract public Interpolator getStagedRectScaleYInterpolator();
abstract public Interpolator getGridSlidePrimaryInterpolator();
abstract public Interpolator getGridSlideSecondaryInterpolator();
public float getGridSlideStartOffset() {
return (float) getGridSlideStart() / getDuration();
@@ -17,7 +17,6 @@
package com.android.quickstep.util;
import static com.android.launcher3.anim.Interpolators.EMPHASIZED;
import static com.android.launcher3.anim.Interpolators.INSTANT;
import android.view.animation.Interpolator;
@@ -41,6 +40,4 @@ public class PhoneOverviewToSplitTimings
public Interpolator getStagedRectYInterpolator() { return EMPHASIZED; }
public Interpolator getStagedRectScaleXInterpolator() { return EMPHASIZED; }
public Interpolator getStagedRectScaleYInterpolator() { return EMPHASIZED; }
public Interpolator getGridSlidePrimaryInterpolator() { return EMPHASIZED; }
public Interpolator getGridSlideSecondaryInterpolator() { return INSTANT; }
}
@@ -17,7 +17,6 @@
package com.android.quickstep.util;
import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import android.view.animation.Interpolator;
@@ -41,6 +40,4 @@ public class TabletOverviewToSplitTimings
public Interpolator getStagedRectYInterpolator() { return DEACCEL_2; }
public Interpolator getStagedRectScaleXInterpolator() { return DEACCEL_2; }
public Interpolator getStagedRectScaleYInterpolator() { return DEACCEL_2; }
public Interpolator getGridSlidePrimaryInterpolator() { return LINEAR; }
public Interpolator getGridSlideSecondaryInterpolator() { return LINEAR; }
}
@@ -3115,6 +3115,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
+ splitTimings.getGridSlideDurationOffset(), 0f, 1f)
: 1f;
// Slide tiles in horizontally to fill dismissed area
anim.setFloat(child, translationProperty, scrollDiff,
clampToProgress(
splitTimings.getGridSlidePrimaryInterpolator(),
@@ -4286,6 +4287,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
snapToPageImmediately(pageToSnapTo);
}
onLayout(false /* changed */, getLeft(), getTop(), getRight(), getBottom());
// We are leaving split selection state, so it is safe to reset thumbnail translations for
// the next time split is invoked.
setTaskViewsPrimarySplitTranslation(0);
setTaskViewsSecondarySplitTranslation(0);
resetTaskVisuals();
mSplitHiddenTaskViewIndex = -1;
}