Loading quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +4 −0 Original line number Diff line number Diff line Loading @@ -482,6 +482,10 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener final View appsView = mLauncher.getAppsView(); final float startAlpha = appsView.getAlpha(); final float startScale = SCALE_PROPERTY.get(appsView); if (mDeviceProfile.isTablet) { // AllApps should not fade at all in tablets. alphas = new float[]{1, 1}; } appsView.setAlpha(alphas[0]); ObjectAnimator alpha = ObjectAnimator.ofFloat(appsView, View.ALPHA, alphas); Loading quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +6 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,12 @@ public class LauncherTaskbarUIController extends TaskbarUIController { return mTaskbarLauncherStateController.isIconAlignedWithHotseat(); } @Override public boolean isHotseatIconOnTopWhenAligned() { return mTaskbarLauncherStateController.isInHotseatOnTopStates() && getInAppDisplayProgress(MINUS_ONE_PAGE_PROGRESS_INDEX) == 0; } @Override public void dumpLogs(String prefix, PrintWriter pw) { super.dumpLogs(prefix, pw); Loading quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +12 −3 Original line number Diff line number Diff line Loading @@ -385,6 +385,13 @@ import java.util.StringJoiner; } } /** * Returns if the current Launcher state has hotseat on top of other elemnets. */ public boolean isInHotseatOnTopStates() { return mLauncherState != LauncherState.ALL_APPS; } private void playStateTransitionAnim(AnimatorSet animatorSet, long duration, boolean committed) { boolean isInStashedState = mLauncherState.isTaskbarStashed(mLauncher); Loading Loading @@ -438,14 +445,16 @@ import java.util.StringJoiner; private void updateIconAlphaForHome(float alpha) { mIconAlphaForHome.setValue(alpha); boolean hotseatVisible = alpha == 0 || (!mControllers.uiController.isHotseatIconOnTopWhenAligned() && mIconAlignment.value > 0); /* * Hide Launcher Hotseat icons when Taskbar icons have opacity. Both icon sets * should not be visible at the same time. */ mLauncher.getHotseat().setIconsAlpha(alpha > 0 ? 0 : 1); mLauncher.getHotseat().setIconsAlpha(hotseatVisible ? 1 : 0); mLauncher.getHotseat().setQsbAlpha( mLauncher.getDeviceProfile().isQsbInline && alpha > 0 ? 0 : 1); mLauncher.getDeviceProfile().isQsbInline && !hotseatVisible ? 0 : 1); } private final class TaskBarRecentsAnimationListener implements Loading quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +26 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.launcher3.taskbar; import static android.view.HapticFeedbackConstants.LONG_PRESS; import static com.android.launcher3.anim.Interpolators.FINAL_FRAME; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_LONGPRESS_HIDE; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_LONGPRESS_SHOW; import static com.android.launcher3.taskbar.Utilities.appendFlag; Loading Loading @@ -535,6 +537,8 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba final float firstHalfDurationScale; final float secondHalfDurationScale; boolean isHotseatIconOnTopWhenAligned = mControllers.uiController.isHotseatIconOnTopWhenAligned(); if (isStashed) { firstHalfDurationScale = 0.75f; secondHalfDurationScale = 0.5f; Loading @@ -555,6 +559,12 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba secondHalfAnimatorSet.playTogether( mTaskbarStashedHandleAlpha.animateToValue(1) ); // If Hotseat is not the top element, an already stashed Taskbar should fade in. if (!isHotseatIconOnTopWhenAligned) { fullLengthAnimatorSet.setInterpolator(INSTANT); firstHalfAnimatorSet.setInterpolator(INSTANT); } } else { firstHalfDurationScale = 0.5f; secondHalfDurationScale = 0.75f; Loading @@ -575,6 +585,13 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba secondHalfAnimatorSet.playTogether( mIconAlphaForStash.animateToValue(1) ); // If Hotseat is not the top element, the stashed Taskbar should fade out without // unstashing. if (!isHotseatIconOnTopWhenAligned) { fullLengthAnimatorSet.setInterpolator(FINAL_FRAME); secondHalfAnimatorSet.setInterpolator(FINAL_FRAME); } } fullLengthAnimatorSet.play(mControllers.stashedHandleViewController Loading Loading @@ -916,6 +933,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba private final IntPredicate mStashCondition; private boolean mIsStashed; private boolean mIsHotseatIconOnTopWhenAligned; private int mPrevFlags; StatePropertyHolder(IntPredicate stashCondition) { Loading Loading @@ -945,7 +963,13 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba mPrevFlags = flags; } boolean isStashed = mStashCondition.test(flags); if (mIsStashed != isStashed) { boolean isHotseatIconOnTopWhenAligned = mControllers.uiController.isHotseatIconOnTopWhenAligned(); // If an animation has started and mIsHotseatIconOnTopWhenAligned is changed, we need // to restart the animation with new parameters. if (mIsStashed != isStashed || (mIsHotseatIconOnTopWhenAligned != isHotseatIconOnTopWhenAligned && mAnimator != null && mAnimator.isStarted())) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.TASKBAR_IN_APP_STATE, String.format( "setState: mIsStashed=%b, isStashed=%b, duration=%d, start=:%b", Loading @@ -955,6 +979,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba start)); } mIsStashed = isStashed; mIsHotseatIconOnTopWhenAligned = isHotseatIconOnTopWhenAligned; // This sets mAnimator. createAnimToIsStashed(mIsStashed, duration, startDelay, /* animateBg= */ true); Loading quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +7 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,13 @@ public class TaskbarUIController { return false; } /** * Returns true if hotseat icons are on top of view hierarchy when aligned in the current state. */ public boolean isHotseatIconOnTopWhenAligned() { return true; } @CallSuper protected void dumpLogs(String prefix, PrintWriter pw) { pw.println(String.format( Loading Loading
quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +4 −0 Original line number Diff line number Diff line Loading @@ -482,6 +482,10 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener final View appsView = mLauncher.getAppsView(); final float startAlpha = appsView.getAlpha(); final float startScale = SCALE_PROPERTY.get(appsView); if (mDeviceProfile.isTablet) { // AllApps should not fade at all in tablets. alphas = new float[]{1, 1}; } appsView.setAlpha(alphas[0]); ObjectAnimator alpha = ObjectAnimator.ofFloat(appsView, View.ALPHA, alphas); Loading
quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +6 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,12 @@ public class LauncherTaskbarUIController extends TaskbarUIController { return mTaskbarLauncherStateController.isIconAlignedWithHotseat(); } @Override public boolean isHotseatIconOnTopWhenAligned() { return mTaskbarLauncherStateController.isInHotseatOnTopStates() && getInAppDisplayProgress(MINUS_ONE_PAGE_PROGRESS_INDEX) == 0; } @Override public void dumpLogs(String prefix, PrintWriter pw) { super.dumpLogs(prefix, pw); Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +12 −3 Original line number Diff line number Diff line Loading @@ -385,6 +385,13 @@ import java.util.StringJoiner; } } /** * Returns if the current Launcher state has hotseat on top of other elemnets. */ public boolean isInHotseatOnTopStates() { return mLauncherState != LauncherState.ALL_APPS; } private void playStateTransitionAnim(AnimatorSet animatorSet, long duration, boolean committed) { boolean isInStashedState = mLauncherState.isTaskbarStashed(mLauncher); Loading Loading @@ -438,14 +445,16 @@ import java.util.StringJoiner; private void updateIconAlphaForHome(float alpha) { mIconAlphaForHome.setValue(alpha); boolean hotseatVisible = alpha == 0 || (!mControllers.uiController.isHotseatIconOnTopWhenAligned() && mIconAlignment.value > 0); /* * Hide Launcher Hotseat icons when Taskbar icons have opacity. Both icon sets * should not be visible at the same time. */ mLauncher.getHotseat().setIconsAlpha(alpha > 0 ? 0 : 1); mLauncher.getHotseat().setIconsAlpha(hotseatVisible ? 1 : 0); mLauncher.getHotseat().setQsbAlpha( mLauncher.getDeviceProfile().isQsbInline && alpha > 0 ? 0 : 1); mLauncher.getDeviceProfile().isQsbInline && !hotseatVisible ? 0 : 1); } private final class TaskBarRecentsAnimationListener implements Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +26 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.launcher3.taskbar; import static android.view.HapticFeedbackConstants.LONG_PRESS; import static com.android.launcher3.anim.Interpolators.FINAL_FRAME; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_LONGPRESS_HIDE; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_LONGPRESS_SHOW; import static com.android.launcher3.taskbar.Utilities.appendFlag; Loading Loading @@ -535,6 +537,8 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba final float firstHalfDurationScale; final float secondHalfDurationScale; boolean isHotseatIconOnTopWhenAligned = mControllers.uiController.isHotseatIconOnTopWhenAligned(); if (isStashed) { firstHalfDurationScale = 0.75f; secondHalfDurationScale = 0.5f; Loading @@ -555,6 +559,12 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba secondHalfAnimatorSet.playTogether( mTaskbarStashedHandleAlpha.animateToValue(1) ); // If Hotseat is not the top element, an already stashed Taskbar should fade in. if (!isHotseatIconOnTopWhenAligned) { fullLengthAnimatorSet.setInterpolator(INSTANT); firstHalfAnimatorSet.setInterpolator(INSTANT); } } else { firstHalfDurationScale = 0.5f; secondHalfDurationScale = 0.75f; Loading @@ -575,6 +585,13 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba secondHalfAnimatorSet.playTogether( mIconAlphaForStash.animateToValue(1) ); // If Hotseat is not the top element, the stashed Taskbar should fade out without // unstashing. if (!isHotseatIconOnTopWhenAligned) { fullLengthAnimatorSet.setInterpolator(FINAL_FRAME); secondHalfAnimatorSet.setInterpolator(FINAL_FRAME); } } fullLengthAnimatorSet.play(mControllers.stashedHandleViewController Loading Loading @@ -916,6 +933,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba private final IntPredicate mStashCondition; private boolean mIsStashed; private boolean mIsHotseatIconOnTopWhenAligned; private int mPrevFlags; StatePropertyHolder(IntPredicate stashCondition) { Loading Loading @@ -945,7 +963,13 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba mPrevFlags = flags; } boolean isStashed = mStashCondition.test(flags); if (mIsStashed != isStashed) { boolean isHotseatIconOnTopWhenAligned = mControllers.uiController.isHotseatIconOnTopWhenAligned(); // If an animation has started and mIsHotseatIconOnTopWhenAligned is changed, we need // to restart the animation with new parameters. if (mIsStashed != isStashed || (mIsHotseatIconOnTopWhenAligned != isHotseatIconOnTopWhenAligned && mAnimator != null && mAnimator.isStarted())) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.TASKBAR_IN_APP_STATE, String.format( "setState: mIsStashed=%b, isStashed=%b, duration=%d, start=:%b", Loading @@ -955,6 +979,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba start)); } mIsStashed = isStashed; mIsHotseatIconOnTopWhenAligned = isHotseatIconOnTopWhenAligned; // This sets mAnimator. createAnimToIsStashed(mIsStashed, duration, startDelay, /* animateBg= */ true); Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +7 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,13 @@ public class TaskbarUIController { return false; } /** * Returns true if hotseat icons are on top of view hierarchy when aligned in the current state. */ public boolean isHotseatIconOnTopWhenAligned() { return true; } @CallSuper protected void dumpLogs(String prefix, PrintWriter pw) { pw.println(String.format( Loading