Loading quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +4 −0 Original line number Diff line number Diff line Loading @@ -868,6 +868,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext { btv.post(() -> mControllers.taskbarPopupController.showForIcon(btv)); } public boolean isInApp() { return mControllers.taskbarStashController.isInApp(); } protected void dumpLogs(String prefix, PrintWriter pw) { pw.println(prefix + "TaskbarActivityContext:"); Loading quickstep/src/com/android/quickstep/TouchInteractionService.java +2 −1 Original line number Diff line number Diff line Loading @@ -462,7 +462,8 @@ public class TouchInteractionService extends Service mOverviewComponentObserver = new OverviewComponentObserver(this, mDeviceState); mOverviewCommandHelper = new OverviewCommandHelper(this, mOverviewComponentObserver, mTaskAnimationManager); mResetGestureInputConsumer = new ResetGestureInputConsumer(mTaskAnimationManager); mResetGestureInputConsumer = new ResetGestureInputConsumer( mTaskAnimationManager, mTaskbarManager::getCurrentActivityContext); mInputConsumer = InputConsumerController.getRecentsAnimationInputConsumer(); mInputConsumer.registerInputConsumer(); onSystemUiFlagsChanged(mDeviceState.getSystemUiStateFlags()); Loading quickstep/src/com/android/quickstep/inputconsumers/ResetGestureInputConsumer.java +11 −2 Original line number Diff line number Diff line Loading @@ -17,18 +17,25 @@ package com.android.quickstep.inputconsumers; import android.view.MotionEvent; import com.android.launcher3.taskbar.TaskbarActivityContext; import com.android.quickstep.InputConsumer; import com.android.quickstep.TaskAnimationManager; import java.util.function.Supplier; /** * A NO_OP input consumer which also resets any pending gesture */ public class ResetGestureInputConsumer implements InputConsumer { private final TaskAnimationManager mTaskAnimationManager; private final Supplier<TaskbarActivityContext> mActivityContextSupplier; public ResetGestureInputConsumer(TaskAnimationManager taskAnimationManager) { public ResetGestureInputConsumer( TaskAnimationManager taskAnimationManager, Supplier<TaskbarActivityContext> activityContextSupplier) { mTaskAnimationManager = taskAnimationManager; mActivityContextSupplier = activityContextSupplier; } @Override Loading @@ -40,7 +47,9 @@ public class ResetGestureInputConsumer implements InputConsumer { public void onMotionEvent(MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_DOWN && mTaskAnimationManager.isRecentsAnimationRunning()) { mTaskAnimationManager.finishRunningRecentsAnimation(false /* toHome */); TaskbarActivityContext tac = mActivityContextSupplier.get(); mTaskAnimationManager.finishRunningRecentsAnimation( /* toHome= */ tac != null && !tac.isInApp()); } } } Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +4 −0 Original line number Diff line number Diff line Loading @@ -868,6 +868,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext { btv.post(() -> mControllers.taskbarPopupController.showForIcon(btv)); } public boolean isInApp() { return mControllers.taskbarStashController.isInApp(); } protected void dumpLogs(String prefix, PrintWriter pw) { pw.println(prefix + "TaskbarActivityContext:"); Loading
quickstep/src/com/android/quickstep/TouchInteractionService.java +2 −1 Original line number Diff line number Diff line Loading @@ -462,7 +462,8 @@ public class TouchInteractionService extends Service mOverviewComponentObserver = new OverviewComponentObserver(this, mDeviceState); mOverviewCommandHelper = new OverviewCommandHelper(this, mOverviewComponentObserver, mTaskAnimationManager); mResetGestureInputConsumer = new ResetGestureInputConsumer(mTaskAnimationManager); mResetGestureInputConsumer = new ResetGestureInputConsumer( mTaskAnimationManager, mTaskbarManager::getCurrentActivityContext); mInputConsumer = InputConsumerController.getRecentsAnimationInputConsumer(); mInputConsumer.registerInputConsumer(); onSystemUiFlagsChanged(mDeviceState.getSystemUiStateFlags()); Loading
quickstep/src/com/android/quickstep/inputconsumers/ResetGestureInputConsumer.java +11 −2 Original line number Diff line number Diff line Loading @@ -17,18 +17,25 @@ package com.android.quickstep.inputconsumers; import android.view.MotionEvent; import com.android.launcher3.taskbar.TaskbarActivityContext; import com.android.quickstep.InputConsumer; import com.android.quickstep.TaskAnimationManager; import java.util.function.Supplier; /** * A NO_OP input consumer which also resets any pending gesture */ public class ResetGestureInputConsumer implements InputConsumer { private final TaskAnimationManager mTaskAnimationManager; private final Supplier<TaskbarActivityContext> mActivityContextSupplier; public ResetGestureInputConsumer(TaskAnimationManager taskAnimationManager) { public ResetGestureInputConsumer( TaskAnimationManager taskAnimationManager, Supplier<TaskbarActivityContext> activityContextSupplier) { mTaskAnimationManager = taskAnimationManager; mActivityContextSupplier = activityContextSupplier; } @Override Loading @@ -40,7 +47,9 @@ public class ResetGestureInputConsumer implements InputConsumer { public void onMotionEvent(MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_DOWN && mTaskAnimationManager.isRecentsAnimationRunning()) { mTaskAnimationManager.finishRunningRecentsAnimation(false /* toHome */); TaskbarActivityContext tac = mActivityContextSupplier.get(); mTaskAnimationManager.finishRunningRecentsAnimation( /* toHome= */ tac != null && !tac.isInApp()); } } }