Loading quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +1 −1 Original line number Diff line number Diff line Loading @@ -277,7 +277,7 @@ import java.util.StringJoiner; boolean committed = !hasAnyFlag(FLAG_TRANSITION_STATE_RUNNING); playStateTransitionAnim(animatorSet, duration, committed); if (committed && mLauncherState == LauncherState.QUICK_SWITCH) { if (committed && mLauncherState == LauncherState.QUICK_SWITCH_FROM_HOME) { // We're about to be paused, set immediately to ensure seamless handoff. updateStateForFlag(FLAG_RESUMED, false); applyState(0 /* duration */); Loading quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.uioverrides; import static com.android.launcher3.LauncherState.QUICK_SWITCH_FROM_HOME; import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE_IN_OUT; import static com.android.launcher3.anim.Interpolators.FINAL_FRAME; import static com.android.launcher3.anim.Interpolators.INSTANT; Loading Loading @@ -167,12 +168,12 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView> LauncherState fromState = mLauncher.getStateManager().getState(); setter.setFloat(mRecentsView, TASK_THUMBNAIL_SPLASH_ALPHA, toState.showTaskThumbnailSplash() ? 1f : 0f, !toState.showTaskThumbnailSplash() && fromState == LauncherState.QUICK_SWITCH !toState.showTaskThumbnailSplash() && fromState == QUICK_SWITCH_FROM_HOME ? LINEAR : INSTANT); boolean showAsGrid = toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()); Interpolator gridProgressInterpolator = showAsGrid ? fromState == LauncherState.QUICK_SWITCH ? LINEAR : INSTANT ? fromState == QUICK_SWITCH_FROM_HOME ? LINEAR : INSTANT : FINAL_FRAME; setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS, showAsGrid ? 1f : 0f, gridProgressInterpolator); Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +11 −11 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ import static com.android.launcher3.LauncherAnimUtils.newCancelListener; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.OVERVIEW_ACTIONS; import static com.android.launcher3.LauncherState.QUICK_SWITCH; import static com.android.launcher3.LauncherState.QUICK_SWITCH_FROM_HOME; import static com.android.launcher3.anim.AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; import static com.android.launcher3.anim.Interpolators.ACCEL_0_75; Loading Loading @@ -195,7 +195,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, nonOverviewBuilder.setInterpolator(ANIM_WORKSPACE_SCALE, FADE_OUT_INTERPOLATOR); nonOverviewBuilder.setInterpolator(ANIM_DEPTH, FADE_OUT_INTERPOLATOR); nonOverviewBuilder.setInterpolator(ANIM_VERTICAL_PROGRESS, TRANSLATE_OUT_INTERPOLATOR); updateNonOverviewAnim(QUICK_SWITCH, nonOverviewBuilder); updateNonOverviewAnim(QUICK_SWITCH_FROM_HOME, nonOverviewBuilder); mNonOverviewAnim.dispatchOnStart(); if (mRecentsView.getTaskViewCount() == 0) { Loading @@ -220,7 +220,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, } private void setupOverviewAnimators() { final LauncherState fromState = QUICK_SWITCH; final LauncherState fromState = QUICK_SWITCH_FROM_HOME; final LauncherState toState = OVERVIEW; // Set RecentView's initial properties. Loading @@ -243,7 +243,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, // Use QuickSwitchState instead of OverviewState to determine scrim color, // since we need to take potential taskbar into account. xAnim.setViewBackgroundColor(mLauncher.getScrimView(), QUICK_SWITCH.getWorkspaceScrimColor(mLauncher), LINEAR); QUICK_SWITCH_FROM_HOME.getWorkspaceScrimColor(mLauncher), LINEAR); if (mRecentsView.getTaskViewCount() == 0) { xAnim.addFloat(mRecentsView, CONTENT_ALPHA, 0f, 1f, LINEAR); } Loading Loading @@ -335,24 +335,24 @@ public class NoButtonQuickSwitchTouchController implements TouchController, } else { if (velocity.y > 0) { // Flinging right and down goes to quick switch. targetState = QUICK_SWITCH; targetState = QUICK_SWITCH_FROM_HOME; } else { // Flinging up and right could go either home or to quick switch. // Determine the target based on the higher velocity. targetState = Math.abs(velocity.x) > Math.abs(velocity.y) ? QUICK_SWITCH : NORMAL; ? QUICK_SWITCH_FROM_HOME : NORMAL; } } } else if (horizontalFling) { targetState = velocity.x > 0 ? QUICK_SWITCH : NORMAL; targetState = velocity.x > 0 ? QUICK_SWITCH_FROM_HOME : NORMAL; } else if (verticalFling) { targetState = velocity.y > 0 ? QUICK_SWITCH : NORMAL; targetState = velocity.y > 0 ? QUICK_SWITCH_FROM_HOME : NORMAL; } else { // If user isn't flinging, just snap to the closest state. boolean passedHorizontalThreshold = mXOverviewAnim.getInterpolatedProgress() > 0.5f; boolean passedVerticalThreshold = mYOverviewAnim.value > 1f; targetState = passedHorizontalThreshold && !passedVerticalThreshold ? QUICK_SWITCH : NORMAL; ? QUICK_SWITCH_FROM_HOME : NORMAL; } // Animate the various components to the target state. Loading Loading @@ -414,7 +414,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, nonOverviewAnim.setFloatValues(startProgress, endProgress); mNonOverviewAnim.dispatchOnStart(); } if (targetState == QUICK_SWITCH) { if (targetState == QUICK_SWITCH_FROM_HOME) { // Navigating to quick switch, add scroll feedback since the first time is not // considered a scroll by the RecentsView. VibratorWrapper.INSTANCE.get(mLauncher).vibrate( Loading @@ -437,7 +437,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, .withSrcState(LAUNCHER_STATE_HOME) .withDstState(targetState.statsLogOrdinal) .log(getLauncherAtomEvent(mStartState.statsLogOrdinal, targetState.statsLogOrdinal, targetState == QUICK_SWITCH targetState == QUICK_SWITCH_FROM_HOME ? LAUNCHER_QUICKSWITCH_RIGHT : targetState.ordinal > mStartState.ordinal ? LAUNCHER_UNKNOWN_SWIPEUP Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java +3 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.QUICK_SWITCH; import static com.android.launcher3.LauncherState.QUICK_SWITCH_FROM_HOME; import static com.android.launcher3.anim.Interpolators.ACCEL_2; import static com.android.launcher3.anim.Interpolators.DEACCEL_2; import static com.android.launcher3.anim.Interpolators.INSTANT; Loading Loading @@ -87,7 +87,7 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll if ((stateFlags & SYSUI_STATE_OVERVIEW_DISABLED) != 0) { return NORMAL; } return isDragTowardPositive ? QUICK_SWITCH : NORMAL; return isDragTowardPositive ? QUICK_SWITCH_FROM_HOME : NORMAL; } @Override Loading @@ -110,7 +110,7 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll // Set RecentView's initial properties for coming in from the side. RECENTS_SCALE_PROPERTY.set(mOverviewPanel, QUICK_SWITCH.getOverviewScaleAndOffset(mLauncher)[0] * 0.85f); QUICK_SWITCH_FROM_HOME.getOverviewScaleAndOffset(mLauncher)[0] * 0.85f); ADJACENT_PAGE_HORIZONTAL_OFFSET.set(mOverviewPanel, 1f); mOverviewPanel.setContentAlpha(1); Loading quickstep/src/com/android/quickstep/LauncherActivityInterface.java +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.quickstep; import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.QUICK_SWITCH; import static com.android.launcher3.LauncherState.QUICK_SWITCH_FROM_HOME; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; Loading Loading @@ -346,7 +346,7 @@ public final class LauncherActivityInterface extends case RECENTS: return OVERVIEW; case NEW_TASK: return QUICK_SWITCH; return QUICK_SWITCH_FROM_HOME; case LAST_TASK: return BACKGROUND_APP; case HOME: Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +1 −1 Original line number Diff line number Diff line Loading @@ -277,7 +277,7 @@ import java.util.StringJoiner; boolean committed = !hasAnyFlag(FLAG_TRANSITION_STATE_RUNNING); playStateTransitionAnim(animatorSet, duration, committed); if (committed && mLauncherState == LauncherState.QUICK_SWITCH) { if (committed && mLauncherState == LauncherState.QUICK_SWITCH_FROM_HOME) { // We're about to be paused, set immediately to ensure seamless handoff. updateStateForFlag(FLAG_RESUMED, false); applyState(0 /* duration */); Loading
quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.uioverrides; import static com.android.launcher3.LauncherState.QUICK_SWITCH_FROM_HOME; import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE_IN_OUT; import static com.android.launcher3.anim.Interpolators.FINAL_FRAME; import static com.android.launcher3.anim.Interpolators.INSTANT; Loading Loading @@ -167,12 +168,12 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView> LauncherState fromState = mLauncher.getStateManager().getState(); setter.setFloat(mRecentsView, TASK_THUMBNAIL_SPLASH_ALPHA, toState.showTaskThumbnailSplash() ? 1f : 0f, !toState.showTaskThumbnailSplash() && fromState == LauncherState.QUICK_SWITCH !toState.showTaskThumbnailSplash() && fromState == QUICK_SWITCH_FROM_HOME ? LINEAR : INSTANT); boolean showAsGrid = toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()); Interpolator gridProgressInterpolator = showAsGrid ? fromState == LauncherState.QUICK_SWITCH ? LINEAR : INSTANT ? fromState == QUICK_SWITCH_FROM_HOME ? LINEAR : INSTANT : FINAL_FRAME; setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS, showAsGrid ? 1f : 0f, gridProgressInterpolator); Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +11 −11 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ import static com.android.launcher3.LauncherAnimUtils.newCancelListener; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.OVERVIEW_ACTIONS; import static com.android.launcher3.LauncherState.QUICK_SWITCH; import static com.android.launcher3.LauncherState.QUICK_SWITCH_FROM_HOME; import static com.android.launcher3.anim.AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; import static com.android.launcher3.anim.Interpolators.ACCEL_0_75; Loading Loading @@ -195,7 +195,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, nonOverviewBuilder.setInterpolator(ANIM_WORKSPACE_SCALE, FADE_OUT_INTERPOLATOR); nonOverviewBuilder.setInterpolator(ANIM_DEPTH, FADE_OUT_INTERPOLATOR); nonOverviewBuilder.setInterpolator(ANIM_VERTICAL_PROGRESS, TRANSLATE_OUT_INTERPOLATOR); updateNonOverviewAnim(QUICK_SWITCH, nonOverviewBuilder); updateNonOverviewAnim(QUICK_SWITCH_FROM_HOME, nonOverviewBuilder); mNonOverviewAnim.dispatchOnStart(); if (mRecentsView.getTaskViewCount() == 0) { Loading @@ -220,7 +220,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, } private void setupOverviewAnimators() { final LauncherState fromState = QUICK_SWITCH; final LauncherState fromState = QUICK_SWITCH_FROM_HOME; final LauncherState toState = OVERVIEW; // Set RecentView's initial properties. Loading @@ -243,7 +243,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, // Use QuickSwitchState instead of OverviewState to determine scrim color, // since we need to take potential taskbar into account. xAnim.setViewBackgroundColor(mLauncher.getScrimView(), QUICK_SWITCH.getWorkspaceScrimColor(mLauncher), LINEAR); QUICK_SWITCH_FROM_HOME.getWorkspaceScrimColor(mLauncher), LINEAR); if (mRecentsView.getTaskViewCount() == 0) { xAnim.addFloat(mRecentsView, CONTENT_ALPHA, 0f, 1f, LINEAR); } Loading Loading @@ -335,24 +335,24 @@ public class NoButtonQuickSwitchTouchController implements TouchController, } else { if (velocity.y > 0) { // Flinging right and down goes to quick switch. targetState = QUICK_SWITCH; targetState = QUICK_SWITCH_FROM_HOME; } else { // Flinging up and right could go either home or to quick switch. // Determine the target based on the higher velocity. targetState = Math.abs(velocity.x) > Math.abs(velocity.y) ? QUICK_SWITCH : NORMAL; ? QUICK_SWITCH_FROM_HOME : NORMAL; } } } else if (horizontalFling) { targetState = velocity.x > 0 ? QUICK_SWITCH : NORMAL; targetState = velocity.x > 0 ? QUICK_SWITCH_FROM_HOME : NORMAL; } else if (verticalFling) { targetState = velocity.y > 0 ? QUICK_SWITCH : NORMAL; targetState = velocity.y > 0 ? QUICK_SWITCH_FROM_HOME : NORMAL; } else { // If user isn't flinging, just snap to the closest state. boolean passedHorizontalThreshold = mXOverviewAnim.getInterpolatedProgress() > 0.5f; boolean passedVerticalThreshold = mYOverviewAnim.value > 1f; targetState = passedHorizontalThreshold && !passedVerticalThreshold ? QUICK_SWITCH : NORMAL; ? QUICK_SWITCH_FROM_HOME : NORMAL; } // Animate the various components to the target state. Loading Loading @@ -414,7 +414,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, nonOverviewAnim.setFloatValues(startProgress, endProgress); mNonOverviewAnim.dispatchOnStart(); } if (targetState == QUICK_SWITCH) { if (targetState == QUICK_SWITCH_FROM_HOME) { // Navigating to quick switch, add scroll feedback since the first time is not // considered a scroll by the RecentsView. VibratorWrapper.INSTANCE.get(mLauncher).vibrate( Loading @@ -437,7 +437,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, .withSrcState(LAUNCHER_STATE_HOME) .withDstState(targetState.statsLogOrdinal) .log(getLauncherAtomEvent(mStartState.statsLogOrdinal, targetState.statsLogOrdinal, targetState == QUICK_SWITCH targetState == QUICK_SWITCH_FROM_HOME ? LAUNCHER_QUICKSWITCH_RIGHT : targetState.ordinal > mStartState.ordinal ? LAUNCHER_UNKNOWN_SWIPEUP Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java +3 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.QUICK_SWITCH; import static com.android.launcher3.LauncherState.QUICK_SWITCH_FROM_HOME; import static com.android.launcher3.anim.Interpolators.ACCEL_2; import static com.android.launcher3.anim.Interpolators.DEACCEL_2; import static com.android.launcher3.anim.Interpolators.INSTANT; Loading Loading @@ -87,7 +87,7 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll if ((stateFlags & SYSUI_STATE_OVERVIEW_DISABLED) != 0) { return NORMAL; } return isDragTowardPositive ? QUICK_SWITCH : NORMAL; return isDragTowardPositive ? QUICK_SWITCH_FROM_HOME : NORMAL; } @Override Loading @@ -110,7 +110,7 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll // Set RecentView's initial properties for coming in from the side. RECENTS_SCALE_PROPERTY.set(mOverviewPanel, QUICK_SWITCH.getOverviewScaleAndOffset(mLauncher)[0] * 0.85f); QUICK_SWITCH_FROM_HOME.getOverviewScaleAndOffset(mLauncher)[0] * 0.85f); ADJACENT_PAGE_HORIZONTAL_OFFSET.set(mOverviewPanel, 1f); mOverviewPanel.setContentAlpha(1); Loading
quickstep/src/com/android/quickstep/LauncherActivityInterface.java +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.quickstep; import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.QUICK_SWITCH; import static com.android.launcher3.LauncherState.QUICK_SWITCH_FROM_HOME; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; Loading Loading @@ -346,7 +346,7 @@ public final class LauncherActivityInterface extends case RECENTS: return OVERVIEW; case NEW_TASK: return QUICK_SWITCH; return QUICK_SWITCH_FROM_HOME; case LAST_TASK: return BACKGROUND_APP; case HOME: Loading