Loading quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java +12 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.quickstep; import static com.android.app.animation.Interpolators.ACCELERATE_1_5; import static com.android.app.animation.Interpolators.LINEAR; import static com.android.launcher3.Flags.enableAdditionalHomeAnimations; import static com.android.launcher3.PagedView.INVALID_PAGE; import android.animation.Animator; Loading Loading @@ -449,7 +450,7 @@ public abstract class SwipeUpAnimationLogic implements float alpha = mAnimationFactory.getWindowAlpha(progress); mHomeAnim.setPlayFraction(progress); if (mTargetTaskView == null) { if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) { mHomeToWindowPositionMap.mapRect(mWindowCurrentRect, currentRect); mMatrix.setRectToRect(mCropRectF, mWindowCurrentRect, ScaleToFit.FILL); mLocalTransformParams Loading @@ -464,10 +465,15 @@ public abstract class SwipeUpAnimationLogic implements mLocalTransformParams.applySurfaceParams( mLocalTransformParams.createSurfaceParams(this)); mAnimationFactory.update( currentRect, progress, mMatrix.mapRadius(cornerRadius), (int) (alpha * 255)); currentRect, progress, mMatrix.mapRadius(cornerRadius), !enableAdditionalHomeAnimations() || mTargetTaskView == null ? 0 : (int) (alpha * 255)); if (mTargetTaskView == null) { if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) { return; } if (mAnimationFactory.isAnimatingIntoIcon() && mAnimationFactory.isAnimationReady()) { Loading Loading @@ -506,7 +512,7 @@ public abstract class SwipeUpAnimationLogic implements public void onAnimationStart(Animator animation) { setUp(); mHomeAnim.dispatchOnStart(); if (mTargetTaskView == null) { if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) { return; } Rect thumbnailBounds = new Rect(); Loading @@ -521,7 +527,7 @@ public abstract class SwipeUpAnimationLogic implements } private void setUp() { if (mTargetTaskView == null) { if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) { return; } RecentsView recentsView = mTargetTaskView.getRecentsView(); Loading @@ -542,7 +548,7 @@ public abstract class SwipeUpAnimationLogic implements } private void cleanUp() { if (mTargetTaskView == null) { if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) { return; } RecentsView recentsView = mTargetTaskView.getRecentsView(); Loading quickstep/src/com/android/quickstep/views/RecentsView.java +4 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import static com.android.app.animation.Interpolators.clampToProgress; import static com.android.launcher3.AbstractFloatingView.TYPE_TASK_MENU; import static com.android.launcher3.AbstractFloatingView.getTopOpenViewWithType; import static com.android.launcher3.BaseActivity.STATE_HANDLER_INVISIBILITY_FLAGS; import static com.android.launcher3.Flags.enableAdditionalHomeAnimations; import static com.android.launcher3.Flags.enableGridOnlyOverview; import static com.android.launcher3.Flags.enableRefactorTaskThumbnail; import static com.android.launcher3.LauncherAnimUtils.SUCCESS_TRANSITION_PROGRESS; Loading Loading @@ -4520,6 +4521,9 @@ public abstract class RecentsView<CONTAINER_TYPE extends Context & RecentsViewCo * than the running task, when updating page offsets. */ public void setOffsetMidpointIndexOverride(int offsetMidpointIndexOverride) { if (!enableAdditionalHomeAnimations()) { return; } mOffsetMidpointIndexOverride = offsetMidpointIndexOverride; updatePageOffsets(); } Loading src/com/android/launcher3/views/ClipIconView.java +4 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.views; import static com.android.app.animation.Interpolators.LINEAR; import static com.android.launcher3.Flags.enableAdditionalHomeAnimations; import static com.android.launcher3.Utilities.boundToRange; import static com.android.launcher3.Utilities.mapToRange; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; Loading Loading @@ -97,6 +98,9 @@ public class ClipIconView extends View implements ClipPathView { * within the clip bounds of this view. */ public void setTaskViewArtist(TaskViewArtist taskViewArtist) { if (!enableAdditionalHomeAnimations()) { return; } mTaskViewArtist = taskViewArtist; invalidate(); } Loading src/com/android/launcher3/views/FloatingIconView.java +7 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.launcher3.views; import static android.view.Gravity.LEFT; import static com.android.app.animation.Interpolators.LINEAR; import static com.android.launcher3.Flags.enableAdditionalHomeAnimations; import static com.android.launcher3.Utilities.getFullDrawable; import static com.android.launcher3.Utilities.mapToRange; import static com.android.launcher3.util.Executors.MODEL_EXECUTOR; Loading Loading @@ -164,7 +165,12 @@ public class FloatingIconView extends FrameLayout implements */ public void update(float alpha, RectF rect, float progress, float shapeProgressStart, float cornerRadius, boolean isOpening, int taskViewDrawAlpha) { setAlpha(isLaidOut() ? alpha : 0f); // The non-running task home animation has some very funky first few frames because this // FIV hasn't fully laid out. During those frames, hide this FIV and continue drawing the // TaskView directly while transforming it in the place of this FIV. However, if we fade // the TaskView at all, we need to display this FIV regardless. setAlpha(!enableAdditionalHomeAnimations() || isLaidOut() || taskViewDrawAlpha < 255 ? alpha : 0f); mClipIconView.update(rect, progress, shapeProgressStart, cornerRadius, isOpening, this, mLauncher.getDeviceProfile(), taskViewDrawAlpha); Loading Loading
quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java +12 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.quickstep; import static com.android.app.animation.Interpolators.ACCELERATE_1_5; import static com.android.app.animation.Interpolators.LINEAR; import static com.android.launcher3.Flags.enableAdditionalHomeAnimations; import static com.android.launcher3.PagedView.INVALID_PAGE; import android.animation.Animator; Loading Loading @@ -449,7 +450,7 @@ public abstract class SwipeUpAnimationLogic implements float alpha = mAnimationFactory.getWindowAlpha(progress); mHomeAnim.setPlayFraction(progress); if (mTargetTaskView == null) { if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) { mHomeToWindowPositionMap.mapRect(mWindowCurrentRect, currentRect); mMatrix.setRectToRect(mCropRectF, mWindowCurrentRect, ScaleToFit.FILL); mLocalTransformParams Loading @@ -464,10 +465,15 @@ public abstract class SwipeUpAnimationLogic implements mLocalTransformParams.applySurfaceParams( mLocalTransformParams.createSurfaceParams(this)); mAnimationFactory.update( currentRect, progress, mMatrix.mapRadius(cornerRadius), (int) (alpha * 255)); currentRect, progress, mMatrix.mapRadius(cornerRadius), !enableAdditionalHomeAnimations() || mTargetTaskView == null ? 0 : (int) (alpha * 255)); if (mTargetTaskView == null) { if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) { return; } if (mAnimationFactory.isAnimatingIntoIcon() && mAnimationFactory.isAnimationReady()) { Loading Loading @@ -506,7 +512,7 @@ public abstract class SwipeUpAnimationLogic implements public void onAnimationStart(Animator animation) { setUp(); mHomeAnim.dispatchOnStart(); if (mTargetTaskView == null) { if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) { return; } Rect thumbnailBounds = new Rect(); Loading @@ -521,7 +527,7 @@ public abstract class SwipeUpAnimationLogic implements } private void setUp() { if (mTargetTaskView == null) { if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) { return; } RecentsView recentsView = mTargetTaskView.getRecentsView(); Loading @@ -542,7 +548,7 @@ public abstract class SwipeUpAnimationLogic implements } private void cleanUp() { if (mTargetTaskView == null) { if (!enableAdditionalHomeAnimations() || mTargetTaskView == null) { return; } RecentsView recentsView = mTargetTaskView.getRecentsView(); Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +4 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import static com.android.app.animation.Interpolators.clampToProgress; import static com.android.launcher3.AbstractFloatingView.TYPE_TASK_MENU; import static com.android.launcher3.AbstractFloatingView.getTopOpenViewWithType; import static com.android.launcher3.BaseActivity.STATE_HANDLER_INVISIBILITY_FLAGS; import static com.android.launcher3.Flags.enableAdditionalHomeAnimations; import static com.android.launcher3.Flags.enableGridOnlyOverview; import static com.android.launcher3.Flags.enableRefactorTaskThumbnail; import static com.android.launcher3.LauncherAnimUtils.SUCCESS_TRANSITION_PROGRESS; Loading Loading @@ -4520,6 +4521,9 @@ public abstract class RecentsView<CONTAINER_TYPE extends Context & RecentsViewCo * than the running task, when updating page offsets. */ public void setOffsetMidpointIndexOverride(int offsetMidpointIndexOverride) { if (!enableAdditionalHomeAnimations()) { return; } mOffsetMidpointIndexOverride = offsetMidpointIndexOverride; updatePageOffsets(); } Loading
src/com/android/launcher3/views/ClipIconView.java +4 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.views; import static com.android.app.animation.Interpolators.LINEAR; import static com.android.launcher3.Flags.enableAdditionalHomeAnimations; import static com.android.launcher3.Utilities.boundToRange; import static com.android.launcher3.Utilities.mapToRange; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; Loading Loading @@ -97,6 +98,9 @@ public class ClipIconView extends View implements ClipPathView { * within the clip bounds of this view. */ public void setTaskViewArtist(TaskViewArtist taskViewArtist) { if (!enableAdditionalHomeAnimations()) { return; } mTaskViewArtist = taskViewArtist; invalidate(); } Loading
src/com/android/launcher3/views/FloatingIconView.java +7 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.launcher3.views; import static android.view.Gravity.LEFT; import static com.android.app.animation.Interpolators.LINEAR; import static com.android.launcher3.Flags.enableAdditionalHomeAnimations; import static com.android.launcher3.Utilities.getFullDrawable; import static com.android.launcher3.Utilities.mapToRange; import static com.android.launcher3.util.Executors.MODEL_EXECUTOR; Loading Loading @@ -164,7 +165,12 @@ public class FloatingIconView extends FrameLayout implements */ public void update(float alpha, RectF rect, float progress, float shapeProgressStart, float cornerRadius, boolean isOpening, int taskViewDrawAlpha) { setAlpha(isLaidOut() ? alpha : 0f); // The non-running task home animation has some very funky first few frames because this // FIV hasn't fully laid out. During those frames, hide this FIV and continue drawing the // TaskView directly while transforming it in the place of this FIV. However, if we fade // the TaskView at all, we need to display this FIV regardless. setAlpha(!enableAdditionalHomeAnimations() || isLaidOut() || taskViewDrawAlpha < 255 ? alpha : 0f); mClipIconView.update(rect, progress, shapeProgressStart, cornerRadius, isOpening, this, mLauncher.getDeviceProfile(), taskViewDrawAlpha); Loading