summaryrefslogtreecommitdiff
path: root/services/accessibility/java
diff options
context:
space:
mode:
author Hiroki Sato <hirokisato@google.com> 2025-02-20 17:49:53 +0900
committer Hiroki Sato <hirokisato@google.com> 2025-02-21 08:59:49 +0900
commit425e2a21bf90721c490a41f0c07cb050eaa99c30 (patch)
tree0f0d6a66368896e6296955f3badf813a837cb212 /services/accessibility/java
parent17c5df8576ba94627eba3e0ded85941ed54d3f09 (diff)
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
Diffstat (limited to 'services/accessibility/java')
-rw-r--r--services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java18
-rw-r--r--services/accessibility/java/com/android/server/accessibility/magnification/MagnificationGestureHandler.java3
2 files changed, 9 insertions, 12 deletions
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);
}
}