Merge "Match live tile with the cut out when swiping down in Overview" into ub-launcher3-master
This commit is contained in:
commit
36a16cd43a
3 files changed
+13
-19
No files matched your search
+9
-1
@@ -184,13 +184,21 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds animation for all the components corresponding to transition from an app to overview
|
||||
* Adds animation for all the components corresponding to transition from an app to overview.
|
||||
*/
|
||||
public void addAppToOverviewAnim(PendingAnimation pa, TimeInterpolator interpolator) {
|
||||
pa.addFloat(fullScreenProgress, AnimatedFloat.VALUE, 1, 0, interpolator);
|
||||
pa.addFloat(recentsViewScale, AnimatedFloat.VALUE, getFullScreenScale(), 1, interpolator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds animation for all the components corresponding to transition from overview to the app.
|
||||
*/
|
||||
public void addOverviewToAppAnim(PendingAnimation pa, TimeInterpolator interpolator) {
|
||||
pa.addFloat(fullScreenProgress, AnimatedFloat.VALUE, 0, 1, interpolator);
|
||||
pa.addFloat(recentsViewScale, AnimatedFloat.VALUE, 1, getFullScreenScale(), interpolator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current clipped/visible window bounds in the window coordinate space
|
||||
*/
|
||||
|
||||
-13
@@ -135,19 +135,6 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher>
|
||||
return anim;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTaskLaunchAnimationUpdate(float progress, TaskView tv) {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
if (tv.isRunningTask()) {
|
||||
mLiveTileParams.setProgress(1 - progress)
|
||||
.setSyncTransactionApplier(mSyncTransactionApplier);
|
||||
// TODO: Revisit live tiles
|
||||
} else {
|
||||
redrawLiveTile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTaskLaunchAnimationEnd(boolean success) {
|
||||
if (success) {
|
||||
|
||||
@@ -1978,8 +1978,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
? targetSysUiFlags
|
||||
: 0);
|
||||
|
||||
onTaskLaunchAnimationUpdate(animator.getAnimatedFraction(), tv);
|
||||
|
||||
// Passing the threshold from taskview to fullscreen app will vibrate
|
||||
final boolean passed = animator.getAnimatedFraction() >=
|
||||
SUCCESS_TRANSITION_PROGRESS;
|
||||
@@ -2003,6 +2001,10 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
|
||||
mPendingAnimation = new PendingAnimation(duration);
|
||||
mPendingAnimation.add(anim);
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
mLiveTileTaskViewSimulator.addOverviewToAppAnim(mPendingAnimation, interpolator);
|
||||
mPendingAnimation.addOnFrameCallback(this::redrawLiveTile);
|
||||
}
|
||||
mPendingAnimation.addEndListener((endState) -> {
|
||||
if (endState.isSuccess) {
|
||||
Consumer<Boolean> onLaunchResult = (result) -> {
|
||||
@@ -2028,9 +2030,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
return mPendingAnimation;
|
||||
}
|
||||
|
||||
protected void onTaskLaunchAnimationUpdate(float progress, TaskView tv) {
|
||||
}
|
||||
|
||||
protected void onTaskLaunchAnimationEnd(boolean success) {
|
||||
if (success) {
|
||||
resetTaskVisuals();
|
||||
|
||||
Reference in new issue
Block a user