Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +1 −3 Original line number Diff line number Diff line Loading @@ -15,8 +15,6 @@ */ package com.android.launcher3.uioverrides.states; import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.Launcher; import com.android.launcher3.allapps.AllAppsTransitionController; Loading @@ -39,7 +37,7 @@ public class BackgroundAppState extends OverviewState { } protected BackgroundAppState(int id, int logContainer) { super(id, logContainer, OVERVIEW_TRANSITION_MS, STATE_FLAGS); super(id, logContainer, STATE_FLAGS); } @Override Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java +14 −7 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.launcher3.uioverrides.states; import static android.view.View.VISIBLE; import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS; import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY; import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_FADE; import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_SCALE; Loading @@ -33,6 +32,7 @@ import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7; import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS; import static com.android.launcher3.logging.LoggerUtils.newContainerTarget; import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE; import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON; import android.graphics.Rect; import android.view.View; Loading Loading @@ -67,15 +67,22 @@ public class OverviewState extends LauncherState { | FLAG_DISABLE_RESTORE | FLAG_OVERVIEW_UI | FLAG_DISABLE_ACCESSIBILITY; public OverviewState(int id) { this(id, OVERVIEW_TRANSITION_MS, STATE_FLAGS); this(id, STATE_FLAGS); } protected OverviewState(int id, int transitionDuration, int stateFlags) { this(id, ContainerType.TASKSWITCHER, transitionDuration, stateFlags); protected OverviewState(int id, int stateFlags) { this(id, ContainerType.TASKSWITCHER, stateFlags); } protected OverviewState(int id, int logContainer, int transitionDuration, int stateFlags) { super(id, logContainer, transitionDuration, stateFlags); protected OverviewState(int id, int logContainer, int stateFlags) { super(id, logContainer, stateFlags); } @Override public int getTransitionDuration(Launcher launcher) { // In no-button mode, overview comes in all the way from the left, so give it more time. boolean isNoButtonMode = SysUINavigationMode.INSTANCE.get(launcher).getMode() == NO_BUTTON; return isNoButtonMode && ENABLE_OVERVIEW_ACTIONS.get() ? 380 : 250; } @Override Loading Loading @@ -206,7 +213,7 @@ public class OverviewState extends LauncherState { public void prepareForAtomicAnimation(Launcher launcher, LauncherState fromState, AnimatorSetBuilder builder) { if ((fromState == NORMAL || fromState == HINT_STATE) && this == OVERVIEW) { if (SysUINavigationMode.getMode(launcher) == SysUINavigationMode.Mode.NO_BUTTON) { if (SysUINavigationMode.getMode(launcher) == NO_BUTTON) { builder.setInterpolator(ANIM_WORKSPACE_SCALE, fromState == NORMAL ? ACCEL : OVERSHOOT_1_2); builder.setInterpolator(ANIM_WORKSPACE_TRANSLATE, ACCEL); Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java +2 −2 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ public class NoButtonNavbarToOverviewTouchController extends FlingAndHoldTouchCo // Normally we compute the duration based on the velocity and distance to the given // state, but since the hint state tracks the entire screen without a clear endpoint, we // need to manually set the duration to a reasonable value. animator.setDuration(HINT_STATE.transitionDuration); animator.setDuration(HINT_STATE.getTransitionDuration(mLauncher)); } } Loading Loading @@ -173,7 +173,7 @@ public class NoButtonNavbarToOverviewTouchController extends FlingAndHoldTouchCo // StaggeredWorkspaceAnim doesn't animate overview, so we handle it here. stateManager.cancelAnimation(); AnimatorSetBuilder builder = new AnimatorSetBuilder(); long duration = OVERVIEW.transitionDuration; long duration = OVERVIEW.getTransitionDuration(mLauncher); AnimatorSet anim = stateManager.createAtomicAnimation( stateManager.getState(), NORMAL, builder, ATOMIC_OVERVIEW_PEEK_COMPONENT, duration); Loading quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java +6 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ */ package com.android.launcher3.uioverrides.states; import static com.android.launcher3.LauncherAnimUtils.ALL_APPS_TRANSITION_MS; import static com.android.launcher3.anim.Interpolators.DEACCEL_2; import com.android.launcher3.AbstractFloatingView; Loading @@ -40,7 +39,12 @@ public class AllAppsState extends LauncherState { }; public AllAppsState(int id) { super(id, ContainerType.ALLAPPS, ALL_APPS_TRANSITION_MS, STATE_FLAGS); super(id, ContainerType.ALLAPPS, STATE_FLAGS); } @Override public int getTransitionDuration(Launcher launcher) { return 320; } @Override Loading src/com/android/launcher3/LauncherAnimUtils.java +0 −6 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.launcher3; import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS; import android.graphics.drawable.Drawable; import android.util.FloatProperty; import android.util.Property; Loading @@ -29,11 +27,7 @@ public class LauncherAnimUtils { * Durations for various state animations. These are not defined in resources to allow * easier access from static classes and enums */ public static final int ALL_APPS_TRANSITION_MS = 320; public static final int OVERVIEW_TRANSITION_MS = ENABLE_OVERVIEW_ACTIONS.get() ? 380 : 250; public static final int SPRING_LOADED_TRANSITION_MS = 150; public static final int SPRING_LOADED_EXIT_DELAY = 500; public static final int HINT_TRANSITION_MS = 80; // The progress of an animation to all apps must be at least this far along to snap to all apps. public static final float MIN_PROGRESS_TO_ALL_APPS = 0.5f; Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +1 −3 Original line number Diff line number Diff line Loading @@ -15,8 +15,6 @@ */ package com.android.launcher3.uioverrides.states; import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.Launcher; import com.android.launcher3.allapps.AllAppsTransitionController; Loading @@ -39,7 +37,7 @@ public class BackgroundAppState extends OverviewState { } protected BackgroundAppState(int id, int logContainer) { super(id, logContainer, OVERVIEW_TRANSITION_MS, STATE_FLAGS); super(id, logContainer, STATE_FLAGS); } @Override Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java +14 −7 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.launcher3.uioverrides.states; import static android.view.View.VISIBLE; import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS; import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY; import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_FADE; import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_SCALE; Loading @@ -33,6 +32,7 @@ import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7; import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS; import static com.android.launcher3.logging.LoggerUtils.newContainerTarget; import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE; import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON; import android.graphics.Rect; import android.view.View; Loading Loading @@ -67,15 +67,22 @@ public class OverviewState extends LauncherState { | FLAG_DISABLE_RESTORE | FLAG_OVERVIEW_UI | FLAG_DISABLE_ACCESSIBILITY; public OverviewState(int id) { this(id, OVERVIEW_TRANSITION_MS, STATE_FLAGS); this(id, STATE_FLAGS); } protected OverviewState(int id, int transitionDuration, int stateFlags) { this(id, ContainerType.TASKSWITCHER, transitionDuration, stateFlags); protected OverviewState(int id, int stateFlags) { this(id, ContainerType.TASKSWITCHER, stateFlags); } protected OverviewState(int id, int logContainer, int transitionDuration, int stateFlags) { super(id, logContainer, transitionDuration, stateFlags); protected OverviewState(int id, int logContainer, int stateFlags) { super(id, logContainer, stateFlags); } @Override public int getTransitionDuration(Launcher launcher) { // In no-button mode, overview comes in all the way from the left, so give it more time. boolean isNoButtonMode = SysUINavigationMode.INSTANCE.get(launcher).getMode() == NO_BUTTON; return isNoButtonMode && ENABLE_OVERVIEW_ACTIONS.get() ? 380 : 250; } @Override Loading Loading @@ -206,7 +213,7 @@ public class OverviewState extends LauncherState { public void prepareForAtomicAnimation(Launcher launcher, LauncherState fromState, AnimatorSetBuilder builder) { if ((fromState == NORMAL || fromState == HINT_STATE) && this == OVERVIEW) { if (SysUINavigationMode.getMode(launcher) == SysUINavigationMode.Mode.NO_BUTTON) { if (SysUINavigationMode.getMode(launcher) == NO_BUTTON) { builder.setInterpolator(ANIM_WORKSPACE_SCALE, fromState == NORMAL ? ACCEL : OVERSHOOT_1_2); builder.setInterpolator(ANIM_WORKSPACE_TRANSLATE, ACCEL); Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java +2 −2 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ public class NoButtonNavbarToOverviewTouchController extends FlingAndHoldTouchCo // Normally we compute the duration based on the velocity and distance to the given // state, but since the hint state tracks the entire screen without a clear endpoint, we // need to manually set the duration to a reasonable value. animator.setDuration(HINT_STATE.transitionDuration); animator.setDuration(HINT_STATE.getTransitionDuration(mLauncher)); } } Loading Loading @@ -173,7 +173,7 @@ public class NoButtonNavbarToOverviewTouchController extends FlingAndHoldTouchCo // StaggeredWorkspaceAnim doesn't animate overview, so we handle it here. stateManager.cancelAnimation(); AnimatorSetBuilder builder = new AnimatorSetBuilder(); long duration = OVERVIEW.transitionDuration; long duration = OVERVIEW.getTransitionDuration(mLauncher); AnimatorSet anim = stateManager.createAtomicAnimation( stateManager.getState(), NORMAL, builder, ATOMIC_OVERVIEW_PEEK_COMPONENT, duration); Loading
quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java +6 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ */ package com.android.launcher3.uioverrides.states; import static com.android.launcher3.LauncherAnimUtils.ALL_APPS_TRANSITION_MS; import static com.android.launcher3.anim.Interpolators.DEACCEL_2; import com.android.launcher3.AbstractFloatingView; Loading @@ -40,7 +39,12 @@ public class AllAppsState extends LauncherState { }; public AllAppsState(int id) { super(id, ContainerType.ALLAPPS, ALL_APPS_TRANSITION_MS, STATE_FLAGS); super(id, ContainerType.ALLAPPS, STATE_FLAGS); } @Override public int getTransitionDuration(Launcher launcher) { return 320; } @Override Loading
src/com/android/launcher3/LauncherAnimUtils.java +0 −6 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.launcher3; import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS; import android.graphics.drawable.Drawable; import android.util.FloatProperty; import android.util.Property; Loading @@ -29,11 +27,7 @@ public class LauncherAnimUtils { * Durations for various state animations. These are not defined in resources to allow * easier access from static classes and enums */ public static final int ALL_APPS_TRANSITION_MS = 320; public static final int OVERVIEW_TRANSITION_MS = ENABLE_OVERVIEW_ACTIONS.get() ? 380 : 250; public static final int SPRING_LOADED_TRANSITION_MS = 150; public static final int SPRING_LOADED_EXIT_DELAY = 500; public static final int HINT_TRANSITION_MS = 80; // The progress of an animation to all apps must be at least this far along to snap to all apps. public static final float MIN_PROGRESS_TO_ALL_APPS = 0.5f; Loading