diff options
| author | sallyyuen <sallyyuen@google.com> | 2020-04-01 11:09:45 -0700 |
|---|---|---|
| committer | sallyyuen <sallyyuen@google.com> | 2020-04-27 13:05:57 -0700 |
| commit | 93edd117240b466c2cbb2f156256dc30402eac2a (patch) | |
| tree | ad9f6d2fd8d1688fe3048f0e546b2f206108afbd /core/java/android | |
| parent | b344e0ac956aeff79372835dc1aa4ecc7980a1ee (diff) | |
Fix system action API issues in SystemActions
1) Actions are only registered when the service starts. If the locale
changes, the labels need to be translated, so re-register the actions
when this happens.
2) When its shortcut isn't visible the a11y menu action is a no-op. The
list should be an accurate representation of what actions are available.
Pass SystemActions into NavigationBarFragment, which keeps track of the
shortcut availability, to unregister/register the action.
To do this, SystemActions exposes register/unregister to the fragment
and makes SYSTEM_ACTION_ID_ACCESSIBILITY_MENU public.
3) Remove Toggle Split Screen from SystemActions. The trigger isn't
system-level but is rather buried in the Recents UI in a button for each
app, and the a11y user can access this like everyone else.
SystemActionPerformer will still handle the legacy action call in
performSystemAction.
4) Rename "Accessibility Menu" to "On-screen Accessibility Shortcut"
Bug: 152636060, 152635646, 154833492
Test: Manual TalkBack test
Change-Id: I9b037f91c8d3b6f193fc9aee95ef73b7f3fbf315
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/accessibilityservice/AccessibilityService.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/accessibilityservice/AccessibilityService.java b/core/java/android/accessibilityservice/AccessibilityService.java index 18e5c3d2d7cc..77b3c81dee85 100644 --- a/core/java/android/accessibilityservice/AccessibilityService.java +++ b/core/java/android/accessibilityservice/AccessibilityService.java @@ -501,6 +501,18 @@ public abstract class AccessibilityService extends Service { */ public static final int GLOBAL_ACTION_KEYCODE_HEADSETHOOK = 10; + /** + * Action to trigger the Accessibility Button + * @hide + */ + public static final int GLOBAL_ACTION_ACCESSIBILITY_BUTTON = 11; + + /** + * Action to bring up the Accessibility Button's chooser menu + * @hide + */ + public static final int GLOBAL_ACTION_ACCESSIBILITY_BUTTON_CHOOSER = 12; + private static final String LOG_TAG = "AccessibilityService"; /** |
