Loading quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java +0 −3 Original line number Diff line number Diff line Loading @@ -21,10 +21,7 @@ import static android.view.MotionEvent.ACTION_MOVE; import static android.view.MotionEvent.ACTION_POINTER_UP; import static android.view.MotionEvent.ACTION_UP; import static android.view.MotionEvent.INVALID_POINTER_ID; import static com.android.quickstep.RemoteRunnable.executeSafely; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_BACK; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_HOME; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_NONE; import android.app.ActivityManager.RunningTaskInfo; Loading quickstep/src/com/android/quickstep/QuickScrubController.java +4 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.view.HapticFeedbackConstants; import com.android.launcher3.Alarm; import com.android.launcher3.OnAlarmListener; import com.android.launcher3.Utilities; /** * Responds to quick scrub callbacks to page through and launch recent tasks. Loading Loading @@ -61,7 +62,8 @@ public class QuickScrubController implements OnAlarmListener { int page = mRecentsView.getNextPage(); Runnable launchTaskRunnable = () -> { if (page < mRecentsView.getFirstTaskIndex()) { mRecentsView.getPageAt(page).performClick(); // Call post() since we can't performClick() on a background thread. mRecentsView.post(() -> mRecentsView.getPageAt(page).performClick()); } else { ((TaskView) mRecentsView.getPageAt(page)).launchTask(true); } Loading Loading @@ -114,6 +116,7 @@ public class QuickScrubController implements OnAlarmListener { } private void goToPageWithHaptic(int pageToGoTo) { pageToGoTo = Utilities.boundToRange(pageToGoTo, mStartPage, mRecentsView.getPageCount() - 1); if (pageToGoTo != mRecentsView.getNextPage()) { int duration = Math.abs(pageToGoTo - mRecentsView.getNextPage()) * QUICKSCRUB_SNAP_DURATION_PER_PAGE; Loading quickstep/src/com/android/quickstep/RecentsAnimationWrapper.java +10 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,9 @@ */ package com.android.quickstep; import android.os.Handler; import android.os.Looper; import com.android.systemui.shared.system.BackgroundExecutor; import com.android.systemui.shared.system.RecentsAnimationControllerCompat; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; Loading @@ -39,12 +42,18 @@ public class RecentsAnimationWrapper { } } public void finish(boolean toHome) { /** * @param onFinishComplete A callback that runs on the UI thread. */ public void finish(boolean toHome, Runnable onFinishComplete) { BackgroundExecutor.get().submit(() -> { synchronized (this) { if (controller != null) { controller.setInputConsumerEnabled(false); controller.finish(toHome); if (onFinishComplete != null) { new Handler(Looper.getMainLooper()).post(onFinishComplete); } } } }); Loading quickstep/src/com/android/quickstep/TouchInteractionService.java +0 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static android.view.MotionEvent.ACTION_MOVE; import static android.view.MotionEvent.ACTION_POINTER_DOWN; import static android.view.MotionEvent.ACTION_POINTER_UP; import static android.view.MotionEvent.ACTION_UP; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.quickstep.QuickScrubController.QUICK_SWITCH_START_DURATION; import static com.android.quickstep.TouchConsumer.INTERACTION_QUICK_SCRUB; Loading Loading @@ -49,7 +48,6 @@ import com.android.launcher3.Launcher; import com.android.launcher3.LauncherAppState; import com.android.launcher3.MainThreadExecutor; import com.android.launcher3.R; import com.android.launcher3.model.ModelPreload; import com.android.systemui.shared.recents.IOverviewProxy; import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.system.ActivityManagerWrapper; Loading quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +14 −14 Original line number Diff line number Diff line Loading @@ -595,7 +595,7 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler { @UiThread private void resumeLastTask() { mRecentsAnimationWrapper.finish(false /* toHome */); mRecentsAnimationWrapper.finish(false /* toHome */, null); } public void reset() { Loading Loading @@ -647,8 +647,7 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler { transaction.apply(); } } mRecentsAnimationWrapper.finish(true /* toHome */); mRecentsAnimationWrapper.finish(true /* toHome */, () -> { if (mInteractionType == INTERACTION_QUICK_SWITCH) { if (mQuickScrubController != null) { mQuickScrubController.onQuickSwitch(); Loading @@ -662,6 +661,7 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler { } } } }); } private void setupLauncherUiAfterSwipeUpAnimation() { Loading Loading
quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java +0 −3 Original line number Diff line number Diff line Loading @@ -21,10 +21,7 @@ import static android.view.MotionEvent.ACTION_MOVE; import static android.view.MotionEvent.ACTION_POINTER_UP; import static android.view.MotionEvent.ACTION_UP; import static android.view.MotionEvent.INVALID_POINTER_ID; import static com.android.quickstep.RemoteRunnable.executeSafely; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_BACK; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_HOME; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_NONE; import android.app.ActivityManager.RunningTaskInfo; Loading
quickstep/src/com/android/quickstep/QuickScrubController.java +4 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.view.HapticFeedbackConstants; import com.android.launcher3.Alarm; import com.android.launcher3.OnAlarmListener; import com.android.launcher3.Utilities; /** * Responds to quick scrub callbacks to page through and launch recent tasks. Loading Loading @@ -61,7 +62,8 @@ public class QuickScrubController implements OnAlarmListener { int page = mRecentsView.getNextPage(); Runnable launchTaskRunnable = () -> { if (page < mRecentsView.getFirstTaskIndex()) { mRecentsView.getPageAt(page).performClick(); // Call post() since we can't performClick() on a background thread. mRecentsView.post(() -> mRecentsView.getPageAt(page).performClick()); } else { ((TaskView) mRecentsView.getPageAt(page)).launchTask(true); } Loading Loading @@ -114,6 +116,7 @@ public class QuickScrubController implements OnAlarmListener { } private void goToPageWithHaptic(int pageToGoTo) { pageToGoTo = Utilities.boundToRange(pageToGoTo, mStartPage, mRecentsView.getPageCount() - 1); if (pageToGoTo != mRecentsView.getNextPage()) { int duration = Math.abs(pageToGoTo - mRecentsView.getNextPage()) * QUICKSCRUB_SNAP_DURATION_PER_PAGE; Loading
quickstep/src/com/android/quickstep/RecentsAnimationWrapper.java +10 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,9 @@ */ package com.android.quickstep; import android.os.Handler; import android.os.Looper; import com.android.systemui.shared.system.BackgroundExecutor; import com.android.systemui.shared.system.RecentsAnimationControllerCompat; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; Loading @@ -39,12 +42,18 @@ public class RecentsAnimationWrapper { } } public void finish(boolean toHome) { /** * @param onFinishComplete A callback that runs on the UI thread. */ public void finish(boolean toHome, Runnable onFinishComplete) { BackgroundExecutor.get().submit(() -> { synchronized (this) { if (controller != null) { controller.setInputConsumerEnabled(false); controller.finish(toHome); if (onFinishComplete != null) { new Handler(Looper.getMainLooper()).post(onFinishComplete); } } } }); Loading
quickstep/src/com/android/quickstep/TouchInteractionService.java +0 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static android.view.MotionEvent.ACTION_MOVE; import static android.view.MotionEvent.ACTION_POINTER_DOWN; import static android.view.MotionEvent.ACTION_POINTER_UP; import static android.view.MotionEvent.ACTION_UP; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.quickstep.QuickScrubController.QUICK_SWITCH_START_DURATION; import static com.android.quickstep.TouchConsumer.INTERACTION_QUICK_SCRUB; Loading Loading @@ -49,7 +48,6 @@ import com.android.launcher3.Launcher; import com.android.launcher3.LauncherAppState; import com.android.launcher3.MainThreadExecutor; import com.android.launcher3.R; import com.android.launcher3.model.ModelPreload; import com.android.systemui.shared.recents.IOverviewProxy; import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.system.ActivityManagerWrapper; Loading
quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +14 −14 Original line number Diff line number Diff line Loading @@ -595,7 +595,7 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler { @UiThread private void resumeLastTask() { mRecentsAnimationWrapper.finish(false /* toHome */); mRecentsAnimationWrapper.finish(false /* toHome */, null); } public void reset() { Loading Loading @@ -647,8 +647,7 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler { transaction.apply(); } } mRecentsAnimationWrapper.finish(true /* toHome */); mRecentsAnimationWrapper.finish(true /* toHome */, () -> { if (mInteractionType == INTERACTION_QUICK_SWITCH) { if (mQuickScrubController != null) { mQuickScrubController.onQuickSwitch(); Loading @@ -662,6 +661,7 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler { } } } }); } private void setupLauncherUiAfterSwipeUpAnimation() { Loading