summaryrefslogtreecommitdiff
path: root/services/accessibility/java
AgeCommit message (Collapse)Author
2025-09-18[SP 2025-09-01] cleanup: Fix permission protection of ↵banksia-dev Daniel Norman
setObservedMotionEventSources The previous permission protection was done inside a Binder clear identity call, meaning that it used the permissions of system_server instead of the permissions of the calling AccessibilityService. Bug: 419110583 Test: atest AccessibilityServiceInfoTest Flag: EXEMPT security bugfix Change-Id: If64838388fa31bdc9abb0896d4011bfef8501a7c
2025-04-15fix: Unbind an A11yService from onNullBinding Daniel Norman
With this fix, a service which returns null in onBind() will no longer stay bound by system_server and will no longer be able to launch activities from the background. Bug: 386950836 Test: Follow steps in the bug to reproduce the issue; observe that BAL is no longer allowed. Test: atest android.security.cts.Bug_386950836 Flag: EXEMPT security bugfix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:36ebe84ca60f19e039a5700e361ad0c32c852b1a) Merged-In: Id04111b061881d23346aa90a0b5d08a28bed2c6f Change-Id: Id04111b061881d23346aa90a0b5d08a28bed2c6f
2025-04-10fix(magnification): catch the unregister failing exception to prevent system ↵ Roy Chou
crash For b/399282180, the context intent receiver unregistering is called when the FullScreenMagnificationGestureHandler#onDestroy, which implies the handler is not needed anymore. That is, the fail execption when unregistering would not affect the user experience, and it should not make the system crash too. Therefore, we use try-catch to catch the exception to prevent system crash. Besides, since we still need more clues to identify the root cause for the exception, we also log the exception for future investigations. This fix should be low risk, since we only catch the exception to prevent the crash, and no logic changes. Bug: 399282180 Flag: EXEMPT bugfix Test: manually atest FullScreenMagnificationGestureHandlerTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:782870d5a691b44837bc0b5308eb7c02a22cb483) Merged-In: I916719958ce3954076a1ad240ffaf150d619cd16 Change-Id: I916719958ce3954076a1ad240ffaf150d619cd16
2025-03-22a11y: Refactor click canceling Gavin Williams
This refactor makes all instances where a scheduled click should be canceled call the same logic. Bug: b/388847769 Test: AutoclickControllerTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: I5885cf556883c278df646aef6f9141cb7cd96f0f
2025-03-20a11y: Perform acutal scroll function Longbo Wei
* Updates cursor position when sending clicks * Implement handleScroll function, this function will perform scrolling operations at that cursor location. Video: http://go/scrcast/NTE5MTI0MDM5NDk5Nzc2MHwyMzI4MmQ1Mi0zZQ Bug: b/393559560 Test: AutoclickControllerTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: Ifd8c54459534b00d3c8a63246564e6d8a5547918
2025-03-20Merge "Add logs to help debugging quick settings shortcut issue" into main Treehugger Robot
2025-03-20Add logs to help debugging quick settings shortcut issue Chun-Ku Lin
Bug: 392560794 Test: N/A Flag: EXEMPT low risk change Change-Id: I9fd960becc98aa3947bcaf79e03b1d454a08455e
2025-03-18Merge changes I7988ce38,I9b704ac6 into main Jason Hsu
* changes: Remove bugfix flag hearing_input_change_when_comm_device Remove bugfix flag hearing_devices_input_routing_ui_improvement
2025-03-18cleanup: Roll out flag copy_events_for_gesture_detection by deleting usage Daniel Norman
This flag was incorrectly tagged as non-bugfix, but is guarding a bugfix. The flag has been in Trunkfood Full for 2 months. Bug: 377736692 Flag: android.view.accessibility.copy_events_for_gesture_detection Test: (existing presubmit; change is a no-op) Change-Id: I9ccb09d0c1f0441cf79c4046802df7e3aac58c73
2025-03-18Remove bugfix flag hearing_input_change_when_comm_device jasonwshsu
Bug: 394070235 Test: atest HearingDevicePhoneCallNotificationControllerTest Flag: EXEMPT remove flag Change-Id: I7988ce38802ba90c5a0abec36f363bc56dd1f384
2025-03-17Merge "a11y: Remove indicator when hovering on directional buttons" into main Longbo Wei
2025-03-17Merge "(4/n) Shift to oneway binder call for register key handler" into main Vaibhav Devmurari
2025-03-14Merge "Changing A11yManagerService to respond to user switching from ↵ Riley Jones
Lifecycle instead of Intents." into main
2025-03-14a11y: Remove indicator when hovering on directional buttons Longbo Wei
Autoclick indicator appears on all scroll panel buttons, causing visual distraction during scrolling. We should remove the indicator when it is on directional buttons. Video: http://shortn/_XJT8X9VxAF Bug: b/403624552 Test: AutoclickControllerTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: Ia0fb0387e6e1d3ee1cf846a8c7dfaa9f0967fd51
2025-03-14Changing A11yManagerService to respond to user switching from Lifecycle ↵ Riley Jones
instead of Intents. This shrinks the window in which AMS holds an incorrect userId to near non-existence, preventing most if not all user-incurred bugs regarding wrong userIds. Test: atest AccessibilityManagerServiceTest Flag: com.android.server.accessibility.manager_lifecycle_user_change Bug: 393626471 Change-Id: I9a8d21a7449da9f27cbf283584e0960d8c79d37e
2025-03-14(4/n) Shift to oneway binder call for register key handler Vaibhav Devmurari
handleKeyGestureEvent() is synchronous API that makes system server dependent on handler and can cause ANR if handlers misbehave. As a replacement, handlers should provide list of gesture they want to listen to. For consistency, we only allow single handler per gesture. Test: atest InputTests Test: atest WmTests Test: Presubmit Bug: 358569822 Bug: 383602794 Flag: EXEMPT refactor Change-Id: Iea0f6ba3360ed241e19f0265d6ab28fd7889aafa
2025-03-13Merge "Fix test fail for HearingDevicePhoneCallNotificationController" into main Jason Hsu
2025-03-14Fix test fail for HearingDevicePhoneCallNotificationController jasonwshsu
Root Cause: attempt to call addOnCommunicationDeviceChangedListeneron a previously registered listener, and fail on pts-bot:HFP/AG#HFP/AG/ECS/BV-03-I CtsTelecomTestCases CtsTelephonyTestCases Solution: Add protection to not register it multiple times Bug: 402755697 Bug: 402749422 Test: atest HearingDevicePhoneCallNotificationControllerTest Test: atest pts-bot:HFP/AG#HFP/AG/ECS/BV-03-I CtsTelecomTestCases CtsTelephonyTestCases Flag: com.android.server.accessibility.hearing_input_change_when_comm_device Change-Id: I51dd57f5578b6672d91356273930371f088fcdd5
2025-03-12Merge "a11y: Add countdown when hovering on exit" into main Longbo Wei
2025-03-12a11y: Fix typing while autoclick enabled Gavin Williams
Because the autoclick panel is TYPE_APPLICATION_OVERLAY, when it was enabled it permanently held focus which prevented typing and probably caused other issues. Setting FLAG_NOT_FOCUSABLE resolves this issue. Demo: http://b/399872186#comment2 Bug: b/399872186 Test: AutoclickTypePanelTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: If1f1ba54ce14a822a2177e8f891dc595c1945b0d
2025-03-12a11y: Add countdown when hovering on exit Longbo Wei
Right now, the scroll panel hides as soon as the user hovers over the exit button, which is not ideal because it can close by accident. This CL fixes it by adding a delay before hiding the panel when the exit button is hovered. The delay time is the same as the set countdown. Video: http://shortn/_JxFXNsIXKe Bug: b/401509893 Test: AutoclickScrollPaneTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: I537131d57e97ef83305fdb492b93423dd36596ce
2025-03-11Merge "Implement double click as autoclick type" into main Yuhan Yang
2025-03-11Implement double click as autoclick type Yuhan Yang
screencast: go/screencast-ndc1njczodi1mdexmzaynhw2mti1mmm1mi01yg Bug: 388844955 Test: atest AutoclickControllerTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: Ic0db436e65ab9de4758f6d3ac9d6e2559ec63bc7
2025-03-11Merge "Add tests for HearingDevicePhoneCallNotificationController when ↵ Jason Hsu
OnCommunicationDeviceChanged" into main
2025-03-10Add display related tests in AccessibilityManagerServiceTest Hiroki Sato
With this change, the test starts to use a real instance of AccessibilityDisplayListener. Because DisplayManager class is a final class and is hard to mock in service tests, this introduces a wrapper for it. Bug: 400872190 Test: AccessibilityManagerServiceTest Flag: TEST_ONLY Change-Id: I7b425727110ede3ca0601b6dc6c7acd85bb91a75
2025-03-08Add tests for HearingDevicePhoneCallNotificationController when ↵ jasonwshsu
OnCommunicationDeviceChanged Bug: 394070235 Test: atest HearingDevicePhoneCallNotificationControllerTest Flag: com.android.server.accessibility.hearing_input_change_when_comm_device Change-Id: I96f22772762a2ebe46d8b215a96cfac40be13725
2025-03-07Observe RevertToLeftClick setting in autoclick controller Yuhan Yang
Observe revertToLeftClick setting changes in autoclick controller. If revertToLeftClick is true, revert autoclick back to leftclick after performing an autoclick action when autoclick type is not leftClick. Also reset autoclick panel state. Bug: 388845719 Test: AutoclickControllerTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: Ie651c8e2b6b889ba4ccdf882b84bee15661dd97c
2025-03-07a11y: Resume autoclick when any button is clicked Gavin Williams
Demo: http://b/398078456#comment2 Bug: b/398078456 Flag: com.android.server.accessibility.enable_autoclick_indicator Test: AutoclickTypePanelTest Change-Id: I8f43148dfbf078ab39c9246234a03fd5599348df
2025-03-06Merge "Make overlay display valid in accessibility" into main Treehugger Robot
2025-03-06Merge "A11y: autoclickScrollPanel - Add Button Hover listeners" into main Longbo Wei
2025-03-07Fix to not show mic input notification when communication device is other ↵ jasonwshsu
bluetooth device Root Cause: We use getAvailableCommunicationDevices to show mic input notification, but did not consider the case that other BT (car in this case) will coexist with hearing device. Solution: Change to listen to the CommunicationDeviceChanged to show mic input notification when communication device for now is hearing device. Bug: 394070235 Test: atest HearingDevicePhoneCallNotificationControllerTest Flag: com.android.server.accessibility.hearing_input_change_when_comm_device Change-Id: I4ae002e407ee8f8e95dc6e22c49295585978067a
2025-03-07Make overlay display valid in accessibility Hiroki Sato
Overlay display is used for multi-display development and testing. Developers can interact with the content using a mouse. This makes accessibility handle overlay display as a valid display. Flag: EXEMPT behavioural tweak that only affects multi-display developers Test: adb shell settings put global overlay_display_devices 640x480/320 \ adb shell uiautomator dump --windows \ and see overlay contents are included. Bug: 400872190 Change-Id: If00e935e7c9a5662a5d94ae23391f7308fef70c8
2025-03-06Merge "Altering TouchExplorer behavior to support Split Tap" into main Riley Jones
2025-03-06Merge changes from topics "remove_isKeyGestureSupported", ↵ Vaibhav Devmurari
"vaibhav_isKeygestureSupported_refactor" into main * changes: (3/n) Remove usage of isKeyGestureSupported() from KeyGestureController (2/n) Remove usage of isKeyGestureSupported() from KeyGestureController
2025-03-06A11y: autoclickScrollPanel - Add Button Hover listeners Longbo Wei
* Add ScrollPanelControllerInterface to handle scroll operations. * Add button hover listeners for direction buttons and exit buttons. Video: http://shortn/_LfNmMSm8VC Bug: b/388845488 Test: AutoclickControllerTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: I50deaa83835d8943d37c19c1266549f0a0ff493e
2025-03-06Altering TouchExplorer behavior to support Split Tap Riley Jones
Allows touchExplorer to broadcast a POINTER_UP event while in the touch exploration state. On TOUCH_INTERACTION_END, TouchState transitions to touch exploration instead of clear if there are any pointers down. Bug: 374930391 Test: atest TouchExplorerTest TouchStateTest Test: manually verify conditions mentioned in bug do not persist. Flag: com.android.server.accessibility.pointer_up_motion_event_in_touch_exploration Change-Id: I33b8d992c9e47d7bd62d2242b1ddbd52d6f81df1
2025-03-06a11y: Force left click when autoclick panel hovered Gavin Williams
Demo: http://b/395094903#comment2 Bug: b/395094903 Flag: com.android.server.accessibility.enable_autoclick_indicator Test: AutoclickTypePanelTest Change-Id: I2049c693a20382ed66061e5017f21da9953782ab
2025-03-05Merge "a11y: Add ScrollPanel" into main Longbo Wei
2025-03-04(3/n) Remove usage of isKeyGestureSupported() from KeyGestureController Vaibhav Devmurari
isKeyGestureSupported is synchronous API that makes system server dependent on handler and can cause ANR if handlers misbehave. It was added as a stop gap for multi-key gestures that require some SysUI info like keyguard state, display state, etc, to decide if the key needs to be consumed or not at the start of the gesture. Test: atest KeygestureControllerTests Bug: 358569822 Bug: 383602794 Flag: EXEMPT refactor Change-Id: I14abee92ede63e57c4c0d92c3d0eb501bd14a3bd
2025-03-03Merge "Re-implement full screen magnification continuous cursor following" ↵ Treehugger Robot
into main
2025-03-03a11y: Add ScrollPanel Longbo Wei
Develop a skeleton scroll panel to manage the autoclick scroll feature. This panel will appear when the autoclick type is set to 'scroll' and a pending click is finished. It will be hidden when the autoclick type is changed from 'scroll' to another type. Note that this is a temporary UI, Our focus is on getting the scroll feature working, and we will update the UI to the final design(screen/W6iBBZJMWWJmmhp) later. video: http://shortn/_4H94pLSb2s Design doc: http://b/397391986#comment2 Bug: b/388845721 Test: AutoclickControllerTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: I57b3b375b55872484da12962e0111bf7a8e07fb9
2025-03-03a11y: Remove CurrentCornerIndex Longbo Wei
CurrentCornerIndex and Corner enum get mixed up easily. This CL removes the CORNER_ROTATION_ORDER array and uses Corner enum values directly to make the code cleaner. Bug: 388847771 Test: AutoclickTypePanelTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: I3d6c49f1d0a3d83f44e5d0b3fbcc2b4b63ec5fb3
2025-02-27Merge "Fix array index out of bounds exception problem." into main am: ↵ Treehugger Robot
a30594a1d3 am: 06de5e5a6a Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3512914 Change-Id: I3ba1da97a643310cbd99281c7024eec8f13b10a2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-27Merge "Fix array index out of bounds exception problem." into main am: ↵ Treehugger Robot
a30594a1d3 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3512914 Change-Id: Ieb1318e6f8b7e545dbed117fab0930fd312f3888 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-27Merge 25Q1 (ab/12770256) to aosp-main-future Xin Li
Bug: 385190204 Merged-In: Ibc80f09d54bec2c83814874d94a8f8eb22b5075f Change-Id: If7779ae57fd91631d08bd8af5434c2ddd963aad7
2025-02-27Merge "a11y: Resume autoclick when hovering panel" into main Gavin Williams
2025-02-27Fix array index out of bounds exception problem. lijilou
The getPrimaryPointerId method may return the INVALID_POINTER_ID(-1) value and result to array index out of bounds exception.The crash log: java.lang.ArrayIndexOutOfBoundsException: length=32; index=-1 at com.android.server.accessibility.gestures.TouchState$ReceivedPointerTracker.getReceivedPointerDownX(TouchState.java:482) at com.android.server.accessibility.gestures.TouchExplorer.handleActionMoveStateTouchExploring(TouchExplorer.java:910) ..... Test: monkey test Flag: EXEMPT bugfix Bug: 399557645 Change-Id: Ib0b14471953d8f78cf98122dd868be8b80059a75
2025-02-26Merge "Remove User Switched Announcement" into main Hawkwood Glazier
2025-02-26a11y: Resume autoclick when hovering panel Gavin Williams
Resume autoclick whenever the panel is hovered to allow the user to get out of a paused state. When the panel is a standard LinearLayout,the View api setOnHoverListener() does not work for this use case becasuse of the child button elements. When the button elements become hovered, the LinearLayout panel considers that as an "ACTION_HOVER_EXIT" even though the button is actually inside the panel. Creating a subclass of LinearLayout is required to implement onInterceptHoverEvent(). This allows the event from hovering of any element part of the "ViewGroup" (i.e. the buttons) to be intercepted and handled as desired. Demo: http://b/397460424#comment2 Bug: b/397460424 Test: AutoclickTypePanelTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: I05f8d8e77585086cb8d8933a5df6c9bbd61437bb
2025-02-25Merge "fix UserManagerService.enforceCurrentUserIfVisibleBackgroundEnabled" ↵ BK Choi
into main