Loading quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarAllApp PropertyValuesHolder.ofFloat(TRANSLATION_SHIFT, TRANSLATION_SHIFT_OPENED)); PropertyValuesHolder.ofFloat(TRANSLATION_SHIFT, TRANSLATION_SHIFT_OPENED)); mOpenCloseAnimator.setInterpolator(AGGRESSIVE_EASE); mOpenCloseAnimator.setInterpolator(AGGRESSIVE_EASE); mOpenCloseAnimator.setDuration( mOpenCloseAnimator.setDuration( ALL_APPS.getTransitionDuration(mContext, true /* isToState */)).start(); ALL_APPS.getTransitionDuration(mActivityContext, true /* isToState */)).start(); } else { } else { mTranslationShift = TRANSLATION_SHIFT_OPENED; mTranslationShift = TRANSLATION_SHIFT_OPENED; } } Loading @@ -81,7 +81,8 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarAllApp @Override @Override protected void handleClose(boolean animate) { protected void handleClose(boolean animate) { Optional.ofNullable(mOnCloseBeginListener).ifPresent(OnCloseListener::onSlideInViewClosed); Optional.ofNullable(mOnCloseBeginListener).ifPresent(OnCloseListener::onSlideInViewClosed); handleClose(animate, ALL_APPS.getTransitionDuration(mContext, false /* isToState */)); handleClose(animate, ALL_APPS.getTransitionDuration(mActivityContext, false /* isToState */)); } } @Override @Override Loading quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_ALLAP import android.content.Context; import android.content.Context; import com.android.launcher3.DeviceProfile.DeviceProfileListenable; import com.android.launcher3.Launcher; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.R; Loading @@ -38,8 +39,11 @@ public class AllAppsState extends LauncherState { } } @Override @Override public int getTransitionDuration(Context context, boolean isToState) { public <DEVICE_PROFILE_CONTEXT extends Context & DeviceProfileListenable> return isToState ? 500 : 300; int getTransitionDuration(DEVICE_PROFILE_CONTEXT context, boolean isToState) { return !context.getDeviceProfile().isTablet && isToState ? 600 : isToState ? 500 : 300; } } @Override @Override Loading quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -66,9 +66,9 @@ public class OverviewState extends LauncherState { @Override @Override public ScaleAndTranslation getWorkspaceScaleAndTranslation(Launcher launcher) { public ScaleAndTranslation getWorkspaceScaleAndTranslation(Launcher launcher) { RecentsView recentsView = launcher.getOverviewPanel(); RecentsView recentsView = launcher.getOverviewPanel(); float workspacePageWidth = launcher.getDeviceProfile().getWorkspaceWidth(); float workspacePageHeight = launcher.getDeviceProfile().getCellLayoutHeight(); recentsView.getTaskSize(sTempRect); recentsView.getTaskSize(sTempRect); float scale = (float) sTempRect.width() / workspacePageWidth; float scale = (float) sTempRect.height() / workspacePageHeight; float parallaxFactor = 0.5f; float parallaxFactor = 0.5f; return new ScaleAndTranslation(scale, 0, -getDefaultSwipeHeight(launcher) * parallaxFactor); return new ScaleAndTranslation(scale, 0, -getDefaultSwipeHeight(launcher) * parallaxFactor); } } Loading quickstep/src/com/android/quickstep/LauncherBackAnimationController.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.quickstep; package com.android.quickstep; import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE; import static com.android.launcher3.BaseActivity.INVISIBLE_ALL; import static com.android.launcher3.BaseActivity.INVISIBLE_ALL; import static com.android.launcher3.BaseActivity.INVISIBLE_BY_PENDING_FLAGS; import static com.android.launcher3.BaseActivity.INVISIBLE_BY_PENDING_FLAGS; import static com.android.launcher3.BaseActivity.PENDING_INVISIBLE_BY_WALLPAPER_ANIMATION; import static com.android.launcher3.BaseActivity.PENDING_INVISIBLE_BY_WALLPAPER_ANIMATION; Loading @@ -37,6 +38,7 @@ import android.view.animation.Interpolator; import android.window.BackEvent; import android.window.BackEvent; import android.window.IOnBackInvokedCallback; import android.window.IOnBackInvokedCallback; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.BaseQuickstepLauncher; import com.android.launcher3.BaseQuickstepLauncher; import com.android.launcher3.QuickstepTransitionManager; import com.android.launcher3.QuickstepTransitionManager; import com.android.launcher3.R; import com.android.launcher3.R; Loading Loading @@ -274,6 +276,10 @@ public class LauncherBackAnimationController { mLauncher.getStateManager().moveToRestState(); mLauncher.getStateManager().moveToRestState(); } } // Explicitly close opened floating views (which is typically called from // Launcher#onResumed, but in the predictive back flow launcher is not resumed until // the transition is fully finished.) AbstractFloatingView.closeAllOpenViewsExcept(mLauncher, false, TYPE_REBIND_SAFE); float cornerRadius = Utilities.mapRange( float cornerRadius = Utilities.mapRange( mBackProgress, mWindowScaleStartCornerRadius, mWindowScaleEndCornerRadius); mBackProgress, mWindowScaleStartCornerRadius, mWindowScaleEndCornerRadius); Pair<RectFSpringAnim, AnimatorSet> pair = Pair<RectFSpringAnim, AnimatorSet> pair = Loading quickstep/src/com/android/quickstep/views/RecentsView.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -4051,7 +4051,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T // TODO(194414938) starting bounds seem slightly off, investigate // TODO(194414938) starting bounds seem slightly off, investigate Rect firstTaskStartingBounds = new Rect(); Rect firstTaskStartingBounds = new Rect(); Rect firstTaskEndingBounds = mTempRect; Rect firstTaskEndingBounds = mTempRect; int duration = mActivity.getStateManager().getState().getTransitionDuration(getContext(), int duration = mActivity.getStateManager().getState().getTransitionDuration(mActivity, false /* isToState */); false /* isToState */); PendingAnimation pendingAnimation = new PendingAnimation(duration); PendingAnimation pendingAnimation = new PendingAnimation(duration); Loading Loading
quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarAllApp PropertyValuesHolder.ofFloat(TRANSLATION_SHIFT, TRANSLATION_SHIFT_OPENED)); PropertyValuesHolder.ofFloat(TRANSLATION_SHIFT, TRANSLATION_SHIFT_OPENED)); mOpenCloseAnimator.setInterpolator(AGGRESSIVE_EASE); mOpenCloseAnimator.setInterpolator(AGGRESSIVE_EASE); mOpenCloseAnimator.setDuration( mOpenCloseAnimator.setDuration( ALL_APPS.getTransitionDuration(mContext, true /* isToState */)).start(); ALL_APPS.getTransitionDuration(mActivityContext, true /* isToState */)).start(); } else { } else { mTranslationShift = TRANSLATION_SHIFT_OPENED; mTranslationShift = TRANSLATION_SHIFT_OPENED; } } Loading @@ -81,7 +81,8 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarAllApp @Override @Override protected void handleClose(boolean animate) { protected void handleClose(boolean animate) { Optional.ofNullable(mOnCloseBeginListener).ifPresent(OnCloseListener::onSlideInViewClosed); Optional.ofNullable(mOnCloseBeginListener).ifPresent(OnCloseListener::onSlideInViewClosed); handleClose(animate, ALL_APPS.getTransitionDuration(mContext, false /* isToState */)); handleClose(animate, ALL_APPS.getTransitionDuration(mActivityContext, false /* isToState */)); } } @Override @Override Loading
quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_ALLAP import android.content.Context; import android.content.Context; import com.android.launcher3.DeviceProfile.DeviceProfileListenable; import com.android.launcher3.Launcher; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.R; Loading @@ -38,8 +39,11 @@ public class AllAppsState extends LauncherState { } } @Override @Override public int getTransitionDuration(Context context, boolean isToState) { public <DEVICE_PROFILE_CONTEXT extends Context & DeviceProfileListenable> return isToState ? 500 : 300; int getTransitionDuration(DEVICE_PROFILE_CONTEXT context, boolean isToState) { return !context.getDeviceProfile().isTablet && isToState ? 600 : isToState ? 500 : 300; } } @Override @Override Loading
quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -66,9 +66,9 @@ public class OverviewState extends LauncherState { @Override @Override public ScaleAndTranslation getWorkspaceScaleAndTranslation(Launcher launcher) { public ScaleAndTranslation getWorkspaceScaleAndTranslation(Launcher launcher) { RecentsView recentsView = launcher.getOverviewPanel(); RecentsView recentsView = launcher.getOverviewPanel(); float workspacePageWidth = launcher.getDeviceProfile().getWorkspaceWidth(); float workspacePageHeight = launcher.getDeviceProfile().getCellLayoutHeight(); recentsView.getTaskSize(sTempRect); recentsView.getTaskSize(sTempRect); float scale = (float) sTempRect.width() / workspacePageWidth; float scale = (float) sTempRect.height() / workspacePageHeight; float parallaxFactor = 0.5f; float parallaxFactor = 0.5f; return new ScaleAndTranslation(scale, 0, -getDefaultSwipeHeight(launcher) * parallaxFactor); return new ScaleAndTranslation(scale, 0, -getDefaultSwipeHeight(launcher) * parallaxFactor); } } Loading
quickstep/src/com/android/quickstep/LauncherBackAnimationController.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.quickstep; package com.android.quickstep; import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE; import static com.android.launcher3.BaseActivity.INVISIBLE_ALL; import static com.android.launcher3.BaseActivity.INVISIBLE_ALL; import static com.android.launcher3.BaseActivity.INVISIBLE_BY_PENDING_FLAGS; import static com.android.launcher3.BaseActivity.INVISIBLE_BY_PENDING_FLAGS; import static com.android.launcher3.BaseActivity.PENDING_INVISIBLE_BY_WALLPAPER_ANIMATION; import static com.android.launcher3.BaseActivity.PENDING_INVISIBLE_BY_WALLPAPER_ANIMATION; Loading @@ -37,6 +38,7 @@ import android.view.animation.Interpolator; import android.window.BackEvent; import android.window.BackEvent; import android.window.IOnBackInvokedCallback; import android.window.IOnBackInvokedCallback; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.BaseQuickstepLauncher; import com.android.launcher3.BaseQuickstepLauncher; import com.android.launcher3.QuickstepTransitionManager; import com.android.launcher3.QuickstepTransitionManager; import com.android.launcher3.R; import com.android.launcher3.R; Loading Loading @@ -274,6 +276,10 @@ public class LauncherBackAnimationController { mLauncher.getStateManager().moveToRestState(); mLauncher.getStateManager().moveToRestState(); } } // Explicitly close opened floating views (which is typically called from // Launcher#onResumed, but in the predictive back flow launcher is not resumed until // the transition is fully finished.) AbstractFloatingView.closeAllOpenViewsExcept(mLauncher, false, TYPE_REBIND_SAFE); float cornerRadius = Utilities.mapRange( float cornerRadius = Utilities.mapRange( mBackProgress, mWindowScaleStartCornerRadius, mWindowScaleEndCornerRadius); mBackProgress, mWindowScaleStartCornerRadius, mWindowScaleEndCornerRadius); Pair<RectFSpringAnim, AnimatorSet> pair = Pair<RectFSpringAnim, AnimatorSet> pair = Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -4051,7 +4051,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T // TODO(194414938) starting bounds seem slightly off, investigate // TODO(194414938) starting bounds seem slightly off, investigate Rect firstTaskStartingBounds = new Rect(); Rect firstTaskStartingBounds = new Rect(); Rect firstTaskEndingBounds = mTempRect; Rect firstTaskEndingBounds = mTempRect; int duration = mActivity.getStateManager().getState().getTransitionDuration(getContext(), int duration = mActivity.getStateManager().getState().getTransitionDuration(mActivity, false /* isToState */); false /* isToState */); PendingAnimation pendingAnimation = new PendingAnimation(duration); PendingAnimation pendingAnimation = new PendingAnimation(duration); Loading