From 425e2a21bf90721c490a41f0c07cb050eaa99c30 Mon Sep 17 00:00:00 2001 From: Hiroki Sato Date: Thu, 20 Feb 2025 17:49:53 +0900 Subject: Cealnup released enable_magnification_follows_mouse_bugfix This is already released. We also plan to have a new implementation, so before starting a new work, let's clean this up. Bug: 354696546 Test: FullScreenMagnificationGestureHandlerTest Test: MagnificationGestureHandlerTest Flag: EXEMPT removing com.android.server.accessibility.enable_magnification_follows_mouse_bugfix Change-Id: I40ddbde78c1a8c1b15a8a29ee3d15784c116dbd8 --- .../FullScreenMagnificationGestureHandler.java | 18 ++++++++---------- .../magnification/MagnificationGestureHandler.java | 3 +-- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'services/accessibility/java') diff --git a/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java b/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java index d11ae0a6ad97..c86c6df56d53 100644 --- a/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java +++ b/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java @@ -340,15 +340,14 @@ public class FullScreenMagnificationGestureHandler extends MagnificationGestureH @Override void handleMouseOrStylusEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { - if (Flags.enableMagnificationFollowsMouseBugfix()) { - if (mFullScreenMagnificationController.isActivated(mDisplayId)) { - // TODO(b/354696546): Allow mouse/stylus to activate whichever display they are - // over, rather than only interacting with the current display. - - // Send through the mouse/stylus event handler. - mMouseEventHandler.onEvent(event, mDisplayId); - } + if (!mFullScreenMagnificationController.isActivated(mDisplayId)) { + return; } + // TODO(b/354696546): Allow mouse/stylus to activate whichever display they are + // over, rather than only interacting with the current display. + + // Send through the mouse/stylus event handler. + mMouseEventHandler.onEvent(event, mDisplayId); } private void handleTouchEventWith( @@ -1170,8 +1169,7 @@ public class FullScreenMagnificationGestureHandler extends MagnificationGestureH protected void cacheDelayedMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { - if (Flags.enableMagnificationFollowsMouseBugfix() - && !event.isFromSource(SOURCE_TOUCHSCREEN)) { + if (!event.isFromSource(SOURCE_TOUCHSCREEN)) { // Only touch events need to be cached and sent later. return; } diff --git a/services/accessibility/java/com/android/server/accessibility/magnification/MagnificationGestureHandler.java b/services/accessibility/java/com/android/server/accessibility/magnification/MagnificationGestureHandler.java index fa86ba39bb1a..6b39c98887bd 100644 --- a/services/accessibility/java/com/android/server/accessibility/magnification/MagnificationGestureHandler.java +++ b/services/accessibility/java/com/android/server/accessibility/magnification/MagnificationGestureHandler.java @@ -146,8 +146,7 @@ public abstract class MagnificationGestureHandler extends BaseEventStreamTransfo } break; case SOURCE_MOUSE: case SOURCE_STYLUS: { - if (magnificationShortcutExists() - && Flags.enableMagnificationFollowsMouseBugfix()) { + if (magnificationShortcutExists()) { handleMouseOrStylusEvent(event, rawEvent, policyFlags); } } -- cgit v1.2.3-59-g8ed1b