From c4e7a768387d1a766627e17b58ae6e9197f1c63c Mon Sep 17 00:00:00 2001 From: Matthew Mourgos Date: Wed, 16 Apr 2025 14:11:53 -0700 Subject: [PATCH] Stop mouse click+drag on home screen from opening notification shade This change is intended for the desktop form factor. Bug: 388898277 Test: Manualy click+drag down on homescreen Flag: com.android.launcher3.enable_mouse_interaction_changes Change-Id: I334752eab88b777e90253b9835da58bbec9935d9 --- .../touchcontrollers/StatusBarTouchController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/StatusBarTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/StatusBarTouchController.java index 6b82741c77..e06a57d36d 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/StatusBarTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/StatusBarTouchController.java @@ -22,10 +22,12 @@ import static android.view.MotionEvent.ACTION_UP; import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY; import static com.android.launcher3.MotionEventsUtils.isTrackpadScroll; +import static com.android.launcher3.Utilities.shouldEnableMouseInteractionChanges; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SWIPE_DOWN_WORKSPACE_NOTISHADE_OPEN; import android.graphics.PointF; import android.util.SparseArray; +import android.view.InputDevice; import android.view.MotionEvent; import android.view.ViewConfiguration; import android.view.Window; @@ -155,7 +157,9 @@ public class StatusBarTouchController implements TouchController { private boolean canInterceptTouch(MotionEvent ev) { if (isTrackpadScroll(ev) || !mIsEnabledCheck.get() || AbstractFloatingView.getTopOpenViewWithType(mLauncher, - AbstractFloatingView.TYPE_STATUS_BAR_SWIPE_DOWN_DISALLOW) != null) { + AbstractFloatingView.TYPE_STATUS_BAR_SWIPE_DOWN_DISALLOW) != null || ( + shouldEnableMouseInteractionChanges(mLauncher.asContext()) + && ev.getSource() == InputDevice.SOURCE_MOUSE)) { return false; } else { // For NORMAL state, only listen if the event originated above the navbar height