Merge "Align live tile with the current task view in Overview when the users swipes up to dismiss" into ub-launcher3-master
This commit is contained in:
committed by
Android (Google) Code Review
commit
1e2602cea0
-15
@@ -16,7 +16,6 @@
|
||||
package com.android.launcher3.uioverrides.touchcontrollers;
|
||||
|
||||
import static com.android.launcher3.AbstractFloatingView.TYPE_ACCESSIBLE;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_BOTH;
|
||||
import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_NEGATIVE;
|
||||
import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_POSITIVE;
|
||||
@@ -262,13 +261,6 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
|
||||
mCurrentAnimation.setPlayFraction(Utilities.boundToRange(
|
||||
totalDisplacement * mProgressMultiplier, 0, 1));
|
||||
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
if (mRecentsView.getCurrentPage() == 0) {
|
||||
mRecentsView.getLiveTileTaskViewSimulator().setOffsetY(
|
||||
isGoingUp ? totalDisplacement : 0);
|
||||
mRecentsView.redrawLiveTile();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -299,13 +291,6 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
|
||||
}
|
||||
|
||||
mCurrentAnimation.setEndAction(() -> onCurrentAnimationEnd(goingToEnd, logAction));
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
mCurrentAnimation.getAnimationPlayer().addUpdateListener(valueAnimator -> {
|
||||
if (mRecentsView.getCurrentPage() != 0 || mCurrentAnimationIsGoingUp) {
|
||||
mRecentsView.redrawLiveTile();
|
||||
}
|
||||
});
|
||||
}
|
||||
mCurrentAnimation.startWithVelocity(mActivity, goingToEnd,
|
||||
velocity, mEndDisplacement, animationDuration);
|
||||
}
|
||||
|
||||
@@ -1501,6 +1501,13 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
anim.addOnFrameCallback(this::updateCurveProperties);
|
||||
}
|
||||
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && getRunningTaskView() == taskView) {
|
||||
anim.addOnFrameCallback(() -> {
|
||||
mLiveTileTaskViewSimulator.setOffsetY(taskView.getTranslationY());
|
||||
redrawLiveTile();
|
||||
});
|
||||
}
|
||||
|
||||
// Add a tiny bit of translation Z, so that it draws on top of other views
|
||||
if (animateTaskView) {
|
||||
taskView.setTranslationZ(0.1f);
|
||||
|
||||
Reference in New Issue
Block a user