Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +6 −2 Original line number Diff line number Diff line Loading @@ -45,8 +45,10 @@ public class BackgroundAppState extends OverviewState { if (launcher.getDeviceProfile().isVerticalBarLayout()) { return super.getVerticalProgress(launcher); } RecentsView recentsView = launcher.getOverviewPanel(); int transitionLength = LayoutUtils.getShelfTrackingDistance(launcher, launcher.getDeviceProfile()); launcher.getDeviceProfile(), recentsView.getPagedOrientationHandler()); AllAppsTransitionController controller = launcher.getAllAppsController(); float scrollRange = Math.max(controller.getShiftRange(), 1); float progressDelta = (transitionLength / scrollRange); Loading @@ -73,9 +75,11 @@ public class BackgroundAppState extends OverviewState { public ScaleAndTranslation getHotseatScaleAndTranslation(Launcher launcher) { if ((getVisibleElements(launcher) & HOTSEAT_ICONS) != 0) { // Translate hotseat offscreen if we show it in overview. RecentsView recentsView = launcher.getOverviewPanel(); ScaleAndTranslation scaleAndTranslation = super.getHotseatScaleAndTranslation(launcher); scaleAndTranslation.translationY += LayoutUtils.getShelfTrackingDistance(launcher, launcher.getDeviceProfile()); launcher.getDeviceProfile(), recentsView.getPagedOrientationHandler()); return scaleAndTranslation; } return super.getHotseatScaleAndTranslation(launcher); Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java +2 −5 Original line number Diff line number Diff line Loading @@ -19,8 +19,7 @@ import static com.android.launcher3.anim.Interpolators.DEACCEL_2; import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS; import static com.android.launcher3.logging.LoggerUtils.newContainerTarget; import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON; import static com.android.quickstep.SysUINavigationMode.Mode.TWO_BUTTONS; import static com.android.quickstep.SysUINavigationMode.getMode; import static com.android.quickstep.SysUINavigationMode.hideShelfInTwoButtonLandscape; import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview; import android.content.Context; Loading Loading @@ -130,10 +129,8 @@ public class OverviewState extends LauncherState { @Override public int getVisibleElements(Launcher launcher) { RecentsView recentsView = launcher.getOverviewPanel(); boolean hideShelfTwoButtonLandscape = getMode(launcher) == TWO_BUTTONS && !recentsView.getPagedOrientationHandler().isLayoutNaturalToLauncher(); if (ENABLE_OVERVIEW_ACTIONS.get() && removeShelfFromOverview(launcher) || hideShelfTwoButtonLandscape) { hideShelfInTwoButtonLandscape(launcher, recentsView.getPagedOrientationHandler())) { return OVERVIEW_BUTTONS; } else if (launcher.getDeviceProfile().isVerticalBarLayout()) { return VERTICAL_SWIPE_INDICATOR | OVERVIEW_BUTTONS; Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, mRecentsView = mLauncher.getOverviewPanel(); mXRange = mLauncher.getDeviceProfile().widthPx / 2f; mYRange = LayoutUtils.getShelfTrackingDistance( mLauncher, mLauncher.getDeviceProfile()); mLauncher, mLauncher.getDeviceProfile(), mRecentsView.getPagedOrientationHandler()); mMotionPauseDetector = new MotionPauseDetector(mLauncher); mMotionPauseMinDisplacement = mLauncher.getResources().getDimension( R.dimen.motion_pause_detector_min_displacement_from_app); Loading quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +3 −2 Original line number Diff line number Diff line Loading @@ -357,12 +357,13 @@ public abstract class BaseSwipeUpHandler<T extends StatefulActivity<?>, Q extend protected void initTransitionEndpoints(DeviceProfile dp) { mDp = dp; mTransitionDragLength = mActivityInterface.getSwipeUpDestinationAndLength( dp, mContext, TEMP_RECT); mTaskViewSimulator.setDp(dp); mTaskViewSimulator.setLayoutRotation( mDeviceState.getCurrentActiveRotation(), mDeviceState.getDisplayRotation()); mTransitionDragLength = mActivityInterface.getSwipeUpDestinationAndLength( dp, mContext, TEMP_RECT, mTaskViewSimulator.getOrientationState().getOrientationHandler()); if (mDeviceState.isFullyGesturalNavMode()) { // We can drag all the way to the top of the screen. Loading quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityInterface.java +8 −4 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.quickstep.fallback.FallbackRecentsView; import com.android.quickstep.fallback.RecentsState; Loading @@ -58,8 +59,9 @@ public final class FallbackActivityInterface extends } @Override public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect) { calculateTaskSize(context, dp, outRect); public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect, PagedOrientationHandler orientationHandler) { calculateTaskSize(context, dp, outRect, orientationHandler); if (dp.isVerticalBarLayout() && SysUINavigationMode.INSTANCE.get(context).getMode() != NO_BUTTON) { Rect targetInsets = dp.getInsets(); Loading Loading @@ -100,7 +102,8 @@ public final class FallbackActivityInterface extends rv.setContentAlpha(1); } createActivityInterface(getSwipeUpDestinationAndLength( activity.getDeviceProfile(), activity, new Rect())); activity.getDeviceProfile(), activity, new Rect(), rv.getPagedOrientationHandler())); } @Override Loading Loading @@ -193,7 +196,8 @@ public final class FallbackActivityInterface extends } @Override protected float getExtraSpace(Context context, DeviceProfile dp) { protected float getExtraSpace(Context context, DeviceProfile dp, PagedOrientationHandler orientationHandler) { return showOverviewActions(context) ? context.getResources().getDimensionPixelSize(R.dimen.overview_actions_height) : 0; Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +6 −2 Original line number Diff line number Diff line Loading @@ -45,8 +45,10 @@ public class BackgroundAppState extends OverviewState { if (launcher.getDeviceProfile().isVerticalBarLayout()) { return super.getVerticalProgress(launcher); } RecentsView recentsView = launcher.getOverviewPanel(); int transitionLength = LayoutUtils.getShelfTrackingDistance(launcher, launcher.getDeviceProfile()); launcher.getDeviceProfile(), recentsView.getPagedOrientationHandler()); AllAppsTransitionController controller = launcher.getAllAppsController(); float scrollRange = Math.max(controller.getShiftRange(), 1); float progressDelta = (transitionLength / scrollRange); Loading @@ -73,9 +75,11 @@ public class BackgroundAppState extends OverviewState { public ScaleAndTranslation getHotseatScaleAndTranslation(Launcher launcher) { if ((getVisibleElements(launcher) & HOTSEAT_ICONS) != 0) { // Translate hotseat offscreen if we show it in overview. RecentsView recentsView = launcher.getOverviewPanel(); ScaleAndTranslation scaleAndTranslation = super.getHotseatScaleAndTranslation(launcher); scaleAndTranslation.translationY += LayoutUtils.getShelfTrackingDistance(launcher, launcher.getDeviceProfile()); launcher.getDeviceProfile(), recentsView.getPagedOrientationHandler()); return scaleAndTranslation; } return super.getHotseatScaleAndTranslation(launcher); Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java +2 −5 Original line number Diff line number Diff line Loading @@ -19,8 +19,7 @@ import static com.android.launcher3.anim.Interpolators.DEACCEL_2; import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS; import static com.android.launcher3.logging.LoggerUtils.newContainerTarget; import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON; import static com.android.quickstep.SysUINavigationMode.Mode.TWO_BUTTONS; import static com.android.quickstep.SysUINavigationMode.getMode; import static com.android.quickstep.SysUINavigationMode.hideShelfInTwoButtonLandscape; import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview; import android.content.Context; Loading Loading @@ -130,10 +129,8 @@ public class OverviewState extends LauncherState { @Override public int getVisibleElements(Launcher launcher) { RecentsView recentsView = launcher.getOverviewPanel(); boolean hideShelfTwoButtonLandscape = getMode(launcher) == TWO_BUTTONS && !recentsView.getPagedOrientationHandler().isLayoutNaturalToLauncher(); if (ENABLE_OVERVIEW_ACTIONS.get() && removeShelfFromOverview(launcher) || hideShelfTwoButtonLandscape) { hideShelfInTwoButtonLandscape(launcher, recentsView.getPagedOrientationHandler())) { return OVERVIEW_BUTTONS; } else if (launcher.getDeviceProfile().isVerticalBarLayout()) { return VERTICAL_SWIPE_INDICATOR | OVERVIEW_BUTTONS; Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, mRecentsView = mLauncher.getOverviewPanel(); mXRange = mLauncher.getDeviceProfile().widthPx / 2f; mYRange = LayoutUtils.getShelfTrackingDistance( mLauncher, mLauncher.getDeviceProfile()); mLauncher, mLauncher.getDeviceProfile(), mRecentsView.getPagedOrientationHandler()); mMotionPauseDetector = new MotionPauseDetector(mLauncher); mMotionPauseMinDisplacement = mLauncher.getResources().getDimension( R.dimen.motion_pause_detector_min_displacement_from_app); Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +3 −2 Original line number Diff line number Diff line Loading @@ -357,12 +357,13 @@ public abstract class BaseSwipeUpHandler<T extends StatefulActivity<?>, Q extend protected void initTransitionEndpoints(DeviceProfile dp) { mDp = dp; mTransitionDragLength = mActivityInterface.getSwipeUpDestinationAndLength( dp, mContext, TEMP_RECT); mTaskViewSimulator.setDp(dp); mTaskViewSimulator.setLayoutRotation( mDeviceState.getCurrentActiveRotation(), mDeviceState.getDisplayRotation()); mTransitionDragLength = mActivityInterface.getSwipeUpDestinationAndLength( dp, mContext, TEMP_RECT, mTaskViewSimulator.getOrientationState().getOrientationHandler()); if (mDeviceState.isFullyGesturalNavMode()) { // We can drag all the way to the top of the screen. Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityInterface.java +8 −4 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.quickstep.fallback.FallbackRecentsView; import com.android.quickstep.fallback.RecentsState; Loading @@ -58,8 +59,9 @@ public final class FallbackActivityInterface extends } @Override public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect) { calculateTaskSize(context, dp, outRect); public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect, PagedOrientationHandler orientationHandler) { calculateTaskSize(context, dp, outRect, orientationHandler); if (dp.isVerticalBarLayout() && SysUINavigationMode.INSTANCE.get(context).getMode() != NO_BUTTON) { Rect targetInsets = dp.getInsets(); Loading Loading @@ -100,7 +102,8 @@ public final class FallbackActivityInterface extends rv.setContentAlpha(1); } createActivityInterface(getSwipeUpDestinationAndLength( activity.getDeviceProfile(), activity, new Rect())); activity.getDeviceProfile(), activity, new Rect(), rv.getPagedOrientationHandler())); } @Override Loading Loading @@ -193,7 +196,8 @@ public final class FallbackActivityInterface extends } @Override protected float getExtraSpace(Context context, DeviceProfile dp) { protected float getExtraSpace(Context context, DeviceProfile dp, PagedOrientationHandler orientationHandler) { return showOverviewActions(context) ? context.getResources().getDimensionPixelSize(R.dimen.overview_actions_height) : 0; Loading