Loading quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java +5 −4 Original line number Diff line number Diff line Loading @@ -197,14 +197,15 @@ public final class LauncherAppTransitionManagerImpl extends QuickstepAppTransiti case INDEX_RECENTS_FADE_ANIM: return ObjectAnimator.ofFloat(mLauncher.getOverviewPanel(), RecentsView.CONTENT_ALPHA, values); case INDEX_RECENTS_TRANSLATE_X_ANIM: // TODO: Do not assume motion across X axis for adjacent page case INDEX_RECENTS_TRANSLATE_X_ANIM: { RecentsView rv = mLauncher.getOverviewPanel(); return new SpringAnimationBuilder(mLauncher) .setMinimumVisibleChange(1f / mLauncher.getOverviewPanel().getWidth()) .setMinimumVisibleChange(1f / rv.getPageOffsetScale()) .setDampingRatio(0.8f) .setStiffness(250) .setValues(values) .build(mLauncher.getOverviewPanel(), ADJACENT_PAGE_OFFSET); .build(rv, ADJACENT_PAGE_OFFSET); } case INDEX_PAUSE_TO_OVERVIEW_ANIM: { StateAnimationConfig config = new StateAnimationConfig(); config.duration = ATOMIC_DURATION_FROM_PAUSED_TO_OVERVIEW; Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java +3 −7 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ */ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; Loading @@ -23,6 +22,7 @@ import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS import static com.android.launcher3.anim.Interpolators.DEACCEL_3; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.launcher3.touch.AbstractStateChangeTouchController.SUCCESS_TRANSITION_PROGRESS; import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_OFFSET; import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS; import android.animation.ValueAnimator; Loading Loading @@ -131,12 +131,8 @@ public class NavBarToHomeTouchController implements TouchController, final PendingAnimation builder = new PendingAnimation(accuracy); if (mStartState == OVERVIEW) { RecentsView recentsView = mLauncher.getOverviewPanel(); float pullbackDist = mPullbackDistance; if (!recentsView.isRtl()) { pullbackDist = -pullbackDist; } builder.setFloat(recentsView, VIEW_TRANSLATE_X, pullbackDist, PULLBACK_INTERPOLATOR); builder.setFloat(recentsView, ADJACENT_PAGE_OFFSET, -mPullbackDistance / recentsView.getPageOffsetScale(), PULLBACK_INTERPOLATOR); if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { builder.addOnFrameCallback( () -> recentsView.redrawLiveTile(false /* mightNeedToRefill */)); Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +7 −0 Original line number Diff line number Diff line Loading @@ -1670,6 +1670,13 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl updateCurveProperties(); } /** * TODO: Do not assume motion across X axis for adjacent page */ public float getPageOffsetScale() { return Math.max(getWidth(), 1); } private void updateDeadZoneRects() { // Get the deadzone rect surrounding the clear all button to not dismiss overview to home mClearAllButtonDeadZoneRect.setEmpty(); Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java +5 −4 Original line number Diff line number Diff line Loading @@ -197,14 +197,15 @@ public final class LauncherAppTransitionManagerImpl extends QuickstepAppTransiti case INDEX_RECENTS_FADE_ANIM: return ObjectAnimator.ofFloat(mLauncher.getOverviewPanel(), RecentsView.CONTENT_ALPHA, values); case INDEX_RECENTS_TRANSLATE_X_ANIM: // TODO: Do not assume motion across X axis for adjacent page case INDEX_RECENTS_TRANSLATE_X_ANIM: { RecentsView rv = mLauncher.getOverviewPanel(); return new SpringAnimationBuilder(mLauncher) .setMinimumVisibleChange(1f / mLauncher.getOverviewPanel().getWidth()) .setMinimumVisibleChange(1f / rv.getPageOffsetScale()) .setDampingRatio(0.8f) .setStiffness(250) .setValues(values) .build(mLauncher.getOverviewPanel(), ADJACENT_PAGE_OFFSET); .build(rv, ADJACENT_PAGE_OFFSET); } case INDEX_PAUSE_TO_OVERVIEW_ANIM: { StateAnimationConfig config = new StateAnimationConfig(); config.duration = ATOMIC_DURATION_FROM_PAUSED_TO_OVERVIEW; Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java +3 −7 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ */ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; Loading @@ -23,6 +22,7 @@ import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS import static com.android.launcher3.anim.Interpolators.DEACCEL_3; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.launcher3.touch.AbstractStateChangeTouchController.SUCCESS_TRANSITION_PROGRESS; import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_OFFSET; import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS; import android.animation.ValueAnimator; Loading Loading @@ -131,12 +131,8 @@ public class NavBarToHomeTouchController implements TouchController, final PendingAnimation builder = new PendingAnimation(accuracy); if (mStartState == OVERVIEW) { RecentsView recentsView = mLauncher.getOverviewPanel(); float pullbackDist = mPullbackDistance; if (!recentsView.isRtl()) { pullbackDist = -pullbackDist; } builder.setFloat(recentsView, VIEW_TRANSLATE_X, pullbackDist, PULLBACK_INTERPOLATOR); builder.setFloat(recentsView, ADJACENT_PAGE_OFFSET, -mPullbackDistance / recentsView.getPageOffsetScale(), PULLBACK_INTERPOLATOR); if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { builder.addOnFrameCallback( () -> recentsView.redrawLiveTile(false /* mightNeedToRefill */)); Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +7 −0 Original line number Diff line number Diff line Loading @@ -1670,6 +1670,13 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl updateCurveProperties(); } /** * TODO: Do not assume motion across X axis for adjacent page */ public float getPageOffsetScale() { return Math.max(getWidth(), 1); } private void updateDeadZoneRects() { // Get the deadzone rect surrounding the clear all button to not dismiss overview to home mClearAllButtonDeadZoneRect.setEmpty(); Loading