Loading quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +0 −10 Original line number Diff line number Diff line Loading @@ -876,16 +876,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext { mControllers.taskbarStashController.updateAndAnimateTransientTaskbar(false); } /** Called when we want to hide the overlay window when user performs swipe up gesture. */ public void onSwipeToHideOverlay() { mControllers.taskbarOverlayController.hideWindow(); } /** Returns {@code true} if taskbar is stashed. */ public boolean isTaskbarStashed() { return mControllers.taskbarStashController.isStashed(); } /** Returns {@code true} if taskbar All Apps is open. */ public boolean isTaskbarAllAppsOpen() { return mControllers.taskbarAllAppsController.isOpen(); Loading quickstep/src/com/android/quickstep/inputconsumers/TaskbarStashInputConsumer.java +0 −19 Original line number Diff line number Diff line Loading @@ -54,11 +54,8 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer { private final float mScreenWidth; private final int mTaskbarNavThresholdY; private final int mTaskbarAppWindowThresholdY; private final boolean mTaskbarAlreadyOpen; private final boolean mIsTaskbarAllAppsOpen; private boolean mHasPassedTaskbarNavThreshold; private boolean mHasPassedTaskbarAppWindowThreshold; private final PointF mDownPos = new PointF(); private final PointF mLastPos = new PointF(); Loading @@ -80,15 +77,8 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer { int taskbarNavThreshold = res.getDimensionPixelSize(ENABLE_TASKBAR_REVISED_THRESHOLDS.get() ? R.dimen.taskbar_nav_threshold_v2 : R.dimen.taskbar_nav_threshold); int taskbarAppWindowThreshold = res.getDimensionPixelSize( ENABLE_TASKBAR_REVISED_THRESHOLDS.get() ? R.dimen.taskbar_app_window_threshold_v2 : R.dimen.taskbar_app_window_threshold); int screenHeight = taskbarActivityContext.getDeviceProfile().heightPx; mTaskbarNavThresholdY = screenHeight - taskbarNavThreshold; mTaskbarAppWindowThresholdY = screenHeight - taskbarAppWindowThreshold; mTaskbarAlreadyOpen = mTaskbarActivityContext != null && !mTaskbarActivityContext.isTaskbarStashed(); mIsTaskbarAllAppsOpen = mTaskbarActivityContext != null && mTaskbarActivityContext.isTaskbarAllAppsOpen(); Loading Loading @@ -127,7 +117,6 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer { mLastPos.set(mDownPos); mHasPassedTaskbarNavThreshold = false; mHasPassedTaskbarAppWindowThreshold = false; mTaskbarActivityContext.setAutohideSuspendFlag( FLAG_AUTOHIDE_SUSPEND_TOUCHING, true); if (isInArea(x)) { Loading Loading @@ -172,18 +161,11 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer { float dY = mLastPos.y - mDownPos.y; boolean passedTaskbarNavThreshold = dY < 0 && mLastPos.y < mTaskbarNavThresholdY; boolean passedTaskbarAppWindowThreshold = dY < 0 && mLastPos.y < mTaskbarAppWindowThresholdY; if (!mHasPassedTaskbarNavThreshold && passedTaskbarNavThreshold) { mHasPassedTaskbarNavThreshold = true; mTaskbarActivityContext.onSwipeToUnstashTaskbar(); } if (mTaskbarAlreadyOpen || (!mHasPassedTaskbarAppWindowThreshold && passedTaskbarAppWindowThreshold)) { mHasPassedTaskbarAppWindowThreshold = true; mTaskbarActivityContext.onSwipeToHideOverlay(); } if (dY < 0) { dY = -OverScroll.dampedScroll(-dY, mTaskbarNavThresholdY); Loading @@ -205,7 +187,6 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer { mTransitionCallback.onActionEnd(); } mHasPassedTaskbarNavThreshold = false; mHasPassedTaskbarAppWindowThreshold = false; break; } } Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +0 −10 Original line number Diff line number Diff line Loading @@ -876,16 +876,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext { mControllers.taskbarStashController.updateAndAnimateTransientTaskbar(false); } /** Called when we want to hide the overlay window when user performs swipe up gesture. */ public void onSwipeToHideOverlay() { mControllers.taskbarOverlayController.hideWindow(); } /** Returns {@code true} if taskbar is stashed. */ public boolean isTaskbarStashed() { return mControllers.taskbarStashController.isStashed(); } /** Returns {@code true} if taskbar All Apps is open. */ public boolean isTaskbarAllAppsOpen() { return mControllers.taskbarAllAppsController.isOpen(); Loading
quickstep/src/com/android/quickstep/inputconsumers/TaskbarStashInputConsumer.java +0 −19 Original line number Diff line number Diff line Loading @@ -54,11 +54,8 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer { private final float mScreenWidth; private final int mTaskbarNavThresholdY; private final int mTaskbarAppWindowThresholdY; private final boolean mTaskbarAlreadyOpen; private final boolean mIsTaskbarAllAppsOpen; private boolean mHasPassedTaskbarNavThreshold; private boolean mHasPassedTaskbarAppWindowThreshold; private final PointF mDownPos = new PointF(); private final PointF mLastPos = new PointF(); Loading @@ -80,15 +77,8 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer { int taskbarNavThreshold = res.getDimensionPixelSize(ENABLE_TASKBAR_REVISED_THRESHOLDS.get() ? R.dimen.taskbar_nav_threshold_v2 : R.dimen.taskbar_nav_threshold); int taskbarAppWindowThreshold = res.getDimensionPixelSize( ENABLE_TASKBAR_REVISED_THRESHOLDS.get() ? R.dimen.taskbar_app_window_threshold_v2 : R.dimen.taskbar_app_window_threshold); int screenHeight = taskbarActivityContext.getDeviceProfile().heightPx; mTaskbarNavThresholdY = screenHeight - taskbarNavThreshold; mTaskbarAppWindowThresholdY = screenHeight - taskbarAppWindowThreshold; mTaskbarAlreadyOpen = mTaskbarActivityContext != null && !mTaskbarActivityContext.isTaskbarStashed(); mIsTaskbarAllAppsOpen = mTaskbarActivityContext != null && mTaskbarActivityContext.isTaskbarAllAppsOpen(); Loading Loading @@ -127,7 +117,6 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer { mLastPos.set(mDownPos); mHasPassedTaskbarNavThreshold = false; mHasPassedTaskbarAppWindowThreshold = false; mTaskbarActivityContext.setAutohideSuspendFlag( FLAG_AUTOHIDE_SUSPEND_TOUCHING, true); if (isInArea(x)) { Loading Loading @@ -172,18 +161,11 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer { float dY = mLastPos.y - mDownPos.y; boolean passedTaskbarNavThreshold = dY < 0 && mLastPos.y < mTaskbarNavThresholdY; boolean passedTaskbarAppWindowThreshold = dY < 0 && mLastPos.y < mTaskbarAppWindowThresholdY; if (!mHasPassedTaskbarNavThreshold && passedTaskbarNavThreshold) { mHasPassedTaskbarNavThreshold = true; mTaskbarActivityContext.onSwipeToUnstashTaskbar(); } if (mTaskbarAlreadyOpen || (!mHasPassedTaskbarAppWindowThreshold && passedTaskbarAppWindowThreshold)) { mHasPassedTaskbarAppWindowThreshold = true; mTaskbarActivityContext.onSwipeToHideOverlay(); } if (dY < 0) { dY = -OverScroll.dampedScroll(-dY, mTaskbarNavThresholdY); Loading @@ -205,7 +187,6 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer { mTransitionCallback.onActionEnd(); } mHasPassedTaskbarNavThreshold = false; mHasPassedTaskbarAppWindowThreshold = false; break; } } Loading