Loading quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +4 −2 Original line number Diff line number Diff line Loading @@ -50,9 +50,11 @@ public class BackgroundAppState extends OverviewState { return super.getVerticalProgress(launcher); } RecentsView recentsView = launcher.getOverviewPanel(); int transitionLength = LayoutUtils.getShelfTrackingDistance(launcher, int transitionLength = LayoutUtils.getShelfTrackingDistance( launcher, launcher.getDeviceProfile(), recentsView.getPagedOrientationHandler()); recentsView.getPagedOrientationHandler(), recentsView.getSizeStrategy()); AllAppsTransitionController controller = launcher.getAllAppsController(); float scrollRange = Math.max(controller.getShiftRange(), 1); float progressDelta = (transitionLength / scrollRange); Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +4 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,10 @@ public class NoButtonQuickSwitchTouchController implements TouchController, mRecentsView = mLauncher.getOverviewPanel(); mXRange = mLauncher.getDeviceProfile().widthPx / 2f; mYRange = LayoutUtils.getShelfTrackingDistance( mLauncher, mLauncher.getDeviceProfile(), mRecentsView.getPagedOrientationHandler()); mLauncher, mLauncher.getDeviceProfile(), mRecentsView.getPagedOrientationHandler(), mRecentsView.getSizeStrategy()); mMaxYProgress = mLauncher.getDeviceProfile().heightPx / mYRange; mMotionPauseDetector = new MotionPauseDetector(mLauncher); mMotionPauseMinDisplacement = mLauncher.getResources().getDimension( Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java +5 −2 Original line number Diff line number Diff line Loading @@ -142,8 +142,11 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr .createPlaybackController(); mLauncher.getStateManager().setCurrentUserControlledAnimation(mCurrentAnimation); RecentsView recentsView = mLauncher.getOverviewPanel(); totalShift = LayoutUtils.getShelfTrackingDistance(mLauncher, mLauncher.getDeviceProfile(), recentsView.getPagedOrientationHandler()); totalShift = LayoutUtils.getShelfTrackingDistance( mLauncher, mLauncher.getDeviceProfile(), recentsView.getPagedOrientationHandler(), recentsView.getSizeStrategy()); } else { mCurrentAnimation = mLauncher.getStateManager() .createAnimationToNewWorkspace(mToState, config); Loading quickstep/src/com/android/quickstep/LauncherActivityInterface.java +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ public final class LauncherActivityInterface extends && DisplayController.getNavigationMode(context) != NavigationMode.NO_BUTTON) { return dp.isSeascape() ? outRect.left : (dp.widthPx - outRect.right); } else { return LayoutUtils.getShelfTrackingDistance(context, dp, orientationHandler); return LayoutUtils.getShelfTrackingDistance(context, dp, orientationHandler, this); } } Loading quickstep/src/com/android/quickstep/util/LayoutUtils.java +7 −4 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import android.view.ViewGroup; import com.android.launcher3.DeviceProfile; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.NavigationMode; import com.android.quickstep.LauncherActivityInterface; import com.android.quickstep.BaseContainerInterface; import com.android.quickstep.orientation.RecentsPagedOrientationHandler; public class LayoutUtils { Loading @@ -41,11 +41,14 @@ public class LayoutUtils { return swipeHeight; } public static int getShelfTrackingDistance(Context context, DeviceProfile dp, RecentsPagedOrientationHandler orientationHandler) { public static int getShelfTrackingDistance( Context context, DeviceProfile dp, RecentsPagedOrientationHandler orientationHandler, BaseContainerInterface<?, ?> baseContainerInterface) { // Track the bottom of the window. Rect taskSize = new Rect(); LauncherActivityInterface.INSTANCE.calculateTaskSize(context, dp, taskSize, baseContainerInterface.calculateTaskSize(context, dp, taskSize, orientationHandler); return orientationHandler.getDistanceToBottomOfRect(dp, taskSize); } Loading Loading
quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +4 −2 Original line number Diff line number Diff line Loading @@ -50,9 +50,11 @@ public class BackgroundAppState extends OverviewState { return super.getVerticalProgress(launcher); } RecentsView recentsView = launcher.getOverviewPanel(); int transitionLength = LayoutUtils.getShelfTrackingDistance(launcher, int transitionLength = LayoutUtils.getShelfTrackingDistance( launcher, launcher.getDeviceProfile(), recentsView.getPagedOrientationHandler()); recentsView.getPagedOrientationHandler(), recentsView.getSizeStrategy()); AllAppsTransitionController controller = launcher.getAllAppsController(); float scrollRange = Math.max(controller.getShiftRange(), 1); float progressDelta = (transitionLength / scrollRange); Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +4 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,10 @@ public class NoButtonQuickSwitchTouchController implements TouchController, mRecentsView = mLauncher.getOverviewPanel(); mXRange = mLauncher.getDeviceProfile().widthPx / 2f; mYRange = LayoutUtils.getShelfTrackingDistance( mLauncher, mLauncher.getDeviceProfile(), mRecentsView.getPagedOrientationHandler()); mLauncher, mLauncher.getDeviceProfile(), mRecentsView.getPagedOrientationHandler(), mRecentsView.getSizeStrategy()); mMaxYProgress = mLauncher.getDeviceProfile().heightPx / mYRange; mMotionPauseDetector = new MotionPauseDetector(mLauncher); mMotionPauseMinDisplacement = mLauncher.getResources().getDimension( Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java +5 −2 Original line number Diff line number Diff line Loading @@ -142,8 +142,11 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr .createPlaybackController(); mLauncher.getStateManager().setCurrentUserControlledAnimation(mCurrentAnimation); RecentsView recentsView = mLauncher.getOverviewPanel(); totalShift = LayoutUtils.getShelfTrackingDistance(mLauncher, mLauncher.getDeviceProfile(), recentsView.getPagedOrientationHandler()); totalShift = LayoutUtils.getShelfTrackingDistance( mLauncher, mLauncher.getDeviceProfile(), recentsView.getPagedOrientationHandler(), recentsView.getSizeStrategy()); } else { mCurrentAnimation = mLauncher.getStateManager() .createAnimationToNewWorkspace(mToState, config); Loading
quickstep/src/com/android/quickstep/LauncherActivityInterface.java +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ public final class LauncherActivityInterface extends && DisplayController.getNavigationMode(context) != NavigationMode.NO_BUTTON) { return dp.isSeascape() ? outRect.left : (dp.widthPx - outRect.right); } else { return LayoutUtils.getShelfTrackingDistance(context, dp, orientationHandler); return LayoutUtils.getShelfTrackingDistance(context, dp, orientationHandler, this); } } Loading
quickstep/src/com/android/quickstep/util/LayoutUtils.java +7 −4 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import android.view.ViewGroup; import com.android.launcher3.DeviceProfile; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.NavigationMode; import com.android.quickstep.LauncherActivityInterface; import com.android.quickstep.BaseContainerInterface; import com.android.quickstep.orientation.RecentsPagedOrientationHandler; public class LayoutUtils { Loading @@ -41,11 +41,14 @@ public class LayoutUtils { return swipeHeight; } public static int getShelfTrackingDistance(Context context, DeviceProfile dp, RecentsPagedOrientationHandler orientationHandler) { public static int getShelfTrackingDistance( Context context, DeviceProfile dp, RecentsPagedOrientationHandler orientationHandler, BaseContainerInterface<?, ?> baseContainerInterface) { // Track the bottom of the window. Rect taskSize = new Rect(); LauncherActivityInterface.INSTANCE.calculateTaskSize(context, dp, taskSize, baseContainerInterface.calculateTaskSize(context, dp, taskSize, orientationHandler); return orientationHandler.getDistanceToBottomOfRect(dp, taskSize); } Loading