158 Commits

Author SHA1 Message Date
Anna Galusza
c71485abaf If the AccessibilityService requesting the soft keyboard to be hidden is
stopped, make sure the keyboard is hidden.
Bug: 27886621

Change-Id: I63ecc0c9506a60cd07660208d37cd6a0bfd5752d
2016-03-29 18:43:49 -07:00
Alan Viverette
4d2a42336b Merge "Various fixes for MagnificationController" into nyc-dev 2016-03-29 15:13:04 +00:00
Alan Viverette
59e53a164e Various fixes for MagnificationController
- Ensure initial magnified and available regions are set
- Correctly offset magnified bounds by left coordinate
- Cancel ongoing animations before unregistering callbacks

Bug: 22718911
Bug: 27871383
Change-Id: Iaff63be856598d1f8edb2d94158bbd75045c86ec
2016-03-28 13:41:32 -04:00
Muyuan Li
3eca3cd334 Merge "Refactor enableAccessibility to AccessibilityManagerService" into nyc-dev 2016-03-25 18:03:36 +00:00
Phil Weaver
2ec58a65d2 Merge "Fix ACCESSIBILITY_ENABLED settings." into nyc-dev 2016-03-23 02:36:35 +00:00
Phil Weaver
517a3e0761 Fix ACCESSIBILITY_ENABLED settings.
A typo meant that the setting reflected the exact opposite of what was
intended.

Bug: 27781201
Change-Id: Icb0d4d585399f147b319093be57d708af4c6dfdc
2016-03-22 17:54:37 -07:00
Muyuan Li
16b8251c89 Refactor enableAccessibility to AccessibilityManagerService
enableAccessibility is refactored from EnableAccessibilityController to
AccessibilityManagerService. Also added are 2 methods disableAccessibility,
and isAccessibilityEnabled.

Bug: 27645255
Change-Id: I32d75ed6617b8bcf82bbee0dd5ee776f430fb386
(cherry picked from commit 84da556422d50e43eb674061cc454f331104d493)
2016-03-22 02:43:28 +00:00
Phil Weaver
45ebfd339f Merge "Fix decision handle accessibility events." into nyc-dev 2016-03-21 16:28:50 +00:00
Phil Weaver
6fdd3afdcc Merge "Treat accessibility actions as user activity" into nyc-dev 2016-03-17 22:19:17 +00:00
Jeff Sharkey
8a372a0a28 Refactoring FBE APIs based on council feedback.
Mostly consists of removing the word "encryption" from most APIs,
since we can't actually make promises about the data being encrypted.

Bug: 27531029
Change-Id: Iace9d7c4e64716abf86ed11847c40f3947e1d625
2016-03-17 14:49:08 -06:00
Phil Weaver
da80d676c7 Treat accessibility actions as user activity
Resurrecting ag/665912.

Bug: 19531976
Change-Id: Ibdddd507215e61b9f4313c36eab8845e9940a7ac
2016-03-17 10:09:39 -07:00
Zachary Kuznia
fd6aa8a1fa Fix double tap issue in TouchExplorer
In certain conditions, the first tap in a double tap could be detected
as Touch Exploration.  This ensures that cannot occur.

Change-Id: I20941be54413534d9dc74e5a3152c27dd0c998fe
2016-03-11 20:21:13 -08:00
Phil Weaver
9b0081df70 Fix decision handle accessibility events.
This was a typo in the original CL.

Change-Id: Iddb2a6ac6848e3ee91694befa1835e56ce50d470
2016-03-10 14:58:13 -08:00
Zachary Kuznia
bf1cf52663 Ensure AccessibilityGestureDetector only returns true when a
callback returned true.

b/26987664

Change-Id: I52687120f784ec958802a9c93b767c2b8f6a7e38
2016-03-09 12:48:08 -08:00
Zach Kuznia
51f0dd6bef Merge "Increase threshold for gesture detection timeout" into nyc-dev 2016-03-09 18:27:39 +00:00
Zachary Kuznia
9002a152c4 Increase threshold for gesture detection timeout
After a user study, it appears a little extra slack for gesture
recognition is a good idea.

Change-Id: I8ff90c715a77c985e8bab671c3782bc8679cc564
2016-03-08 16:08:52 -08:00
Muyuan Li
6ca619fe1a Partial screenshot
Added a partial screenshot function in TakeScreenshotService
also added corresponding shortcut keys in PhoneWindowManager

Bug: 26820467
Change-Id: Id67cd3b4b0eed848eb4665056766546500bdac88
(cherry picked from commit 03e45541e9d54a2f285906ac7b5bcb374db14495)
2016-03-08 14:12:18 -08:00
Phil Weaver
54677d2a55 Control AccessibilityServices with one setting.
Accessibility services were controlled by two settings:
ENABLED_ACCESSIBILITY_SERVICES and ACCESSIBILITY_ENABLED. These
settings needed to be changed together, and race conditions could
creating inconsistent states as ACCESSIBILITY_ENABLED was also
changed by the framework itself.

Restructuring to keep ACCESSIBILITY_ENABLED up-to-date, but not to
use it to decide whether or not to enable accessibility. Enabling
is controlled solely by ENABLED_ACCESSIBILITY_SERVICES.

Bug: 27455234
Change-Id: I9ab1e5936080c1b0dd8410dd6e8666e7f6eaccf3
2016-03-03 08:28:51 -08:00
Phil Weaver
8c8e55904a Merge "Control magnification only with the setting." into nyc-dev 2016-02-26 20:57:46 +00:00
Phil Weaver
6cb67af65f Control magnification only with the setting.
Don't turn off magnification if gestures are enabled.

Bug: 26571116
Change-Id: I8dafcd4eef50bfa8f9474bf98637f8e54f3527e1
2016-02-26 11:34:35 -08:00
Phil Weaver
8ca583b29f Merge "Accessibility to toggle multiwindow mode" into nyc-dev 2016-02-25 23:16:52 +00:00
Phil Weaver
315c34e7d6 Accessibility to toggle multiwindow mode
Encapsulating the logic to toggle multiwindow mode from recents,
and plumbing it through to accessibility global actions. Sending
accessibility events when windows bounds change. Exposing the
dock divider window type to accessibility services.

Bug: 27250995
Change-Id: Ib7491f1f853dc7f01bf5c5a4ac1f914f55d0608a
2016-02-25 15:13:11 -08:00
Jeff Sharkey
e88e266547 Update accessibility to be encryption-aware.
Look for both EA and non-EA accessibility services, but when the user
is locked only bind to EA services.  Once the user is unlocked, we
take another pass and bind to any non-EA services.

We only consider disabling accessibility once the user is unlocked,
since there could be non-EA services waiting in the wings.

Bug: 25860579
Change-Id: I97bd019661457c3577d629ba12290d02f026011a
2016-02-23 20:15:15 -07:00
Svetoslav Ganov
1b5d292fbb Merge "Clear binder id before creating pending intent as the system." into nyc-dev 2016-02-20 01:26:38 +00:00
Svet Ganov
c42d933b56 Clear binder id before creating pending intent as the system.
bug:19349693

Change-Id: I989441ac32b89d313ec7a006373faa90f58fc89d
2016-02-19 17:24:58 -08:00
Zachary Kuznia
0bc3cc9c2f Fix crash when cancelling an accessibility gesture with ACTION_UP.
b/27090049

Change-Id: I7a5b65c4e96513539d820c9a2bef99272fb24680
(cherry picked from commit 3951e3547f2ebb5ec228b8776855e9f244b1e9e9)
2016-02-18 17:57:18 +00:00
Phil Weaver
e7b198353c Protect MotionEvent stream when a11y changes.
I found this hole while looking for a solution to a bug when
magnification was enabled when TalkBack was running. I believe
what was happening was that enabling/disabling magnification
resets the AccessibilityInputFilter. The filter batches MotionEvents
for processing with a choreographer, but the disable/enable cycle
when magnification gets enabled could disrupt the event stream.
This change flushes the batched events before objects using them
are disabled.

I've tried a variety of things, but I'm not able to reproduce the
bug on NYC using the same procedure. I suspect that either the
timing of the events is different, or the newer gesture detection
in TalkBack is protecting it somehow. The hole remains, though,
and could create invalid streams of MotionEvents without this fix.

Bug: 26613222
Change-Id: Ie9f3da459929397596e0a80a61d5c7f191001ee8
2016-02-17 15:02:35 -08:00
Zachary Kuznia
c8e941f4ba Update the timeout values for accessibility gestures.
Change-Id: I1e6ed7bbec46b848c1278922be3110733a64dcb6
(cherry picked from commit 0522205fd5fdc460fb7af78a3ac4a17fcb988ac5)
2016-02-12 21:20:36 +00:00
Phil Weaver
cc494765fa Merge "Clean up UiAutomation working alongside a11y." into nyc-dev 2016-02-09 16:59:26 +00:00
Phil Weaver
78d2e2ddf0 Clean up accessibility gestures.
Closing two small holes in the implementation:
1. The gesture was dispatched before the callback was registered. It
was possible for gestures that failed quickly to fail to report any
status.
2. Gestures could be dispatched before the input filter was
installed. Adding a wait to give the filter a chance to install
before reporting a failure.

Also removing an unused method on the input filter.

Change-Id: I77cd80dcd2cec6c72b3761169aba5eaecf62250b
(cherry picked from commit 03465fb874ccf35ead2228b66ec03afc31d7694e)
2016-02-09 00:51:18 +00:00
Phil Weaver
f564afa4cd Clean up UiAutomation working alongside a11y.
Fix two bugs: one where Instrumentation did not properly
handle destroyed UiAutomations, another where UiAutomation
did not properly disable running accessibility services.

Change-Id: I1773dbd373f4d5b0e7c9917ff18d8d9b1a0e07c7
(cherry picked from commit 846522cea043d3113b3b96daa8f3a1b70e3beb5e)
2016-02-09 00:08:59 +00:00
Zachary Kuznia
28239e8a61 Improve gesture recognition state change for TouchExplorer.
This increases the tolerace for detecting a user interaction as a
gesture in Touch exploration mode.  The detection should also be more
consistant between devices, as the threshold is based on physical
units.

Change-Id: Iec935e862d2634fba0fea6dc6d81e62ed2213cbc
2016-02-03 12:06:13 -08:00
Zach Kuznia
7647b678c2 Merge "Make AccessibilityGestureDetector handle gesture detection start and end." 2016-02-02 18:31:35 +00:00
Zachary Kuznia
9254b3e336 Make AccessibilityGestureDetector handle gesture detection start and end.
Change-Id: I2c1861d5d6c5c0dc921e62f03ee6283f1f7a62b6
2016-02-01 19:28:33 -08:00
Dan Sandler
8766c398df Make color matrix parsing more robust.
Bug: 26880793
Change-Id: I95e1b24ed949c6b341ecee7de5732a286c674824
2016-02-01 16:13:15 +00:00
Anna Galusza
f3e5d1d483 Merge "Add API for IME control by Accessibility Services." 2016-01-29 16:58:07 +00:00
Phil Weaver
1dd872260b Optionally support accessibility with UiAutomator
Adding a flag to AccessibilityServiceInfo that only works
for UIAutomator that supresses other services. This flag
is set by default for UIAutomation to match the current
behavior, but tests may clear the flag and enable other
services.

Needed to improve cts coverage of AccessibilityService.

Bug: 26592034
Change-Id: Icfc2833c1bd6546a22a169008d88a6b15e83989c
2016-01-28 10:09:05 -08:00
Anna Galusza
9b27811246 Add API for IME control by Accessibility Services.
Change-Id: I3bb806cf420e0551a2c9ef97d95613f73e362df9
2016-01-27 17:35:59 -08:00
Svetoslav Ganov
a3a1ea3dbe Merge "Clear binder calling identity before mutating secure settings." 2016-01-25 17:24:02 +00:00
Svet Ganov
81fcf7037b Clear binder calling identity before mutating secure settings.
The accessibility manager service changes secure settings without
clearing binder calling identnty. Luckily it worked for a long
time as the calls resulting in a secure setting change were not
made on a binder thread. Now we clear calling identity before
mutating secure settings - note that we alsways do this after
a security check, hece it is safe.

bug:26766532

Change-Id: Icb188e6de1a134f38de0bdb23c67fa4ff2806ba4
2016-01-25 09:12:44 -08:00
Jinsong Mu
a9e7a3bbe8 Accessibility services can turn themselves off b/22514381
Added disableSelf() method to AccessibilityService
This newly added api used used in
https://googleplex-android-review.git.corp.google.com/#/c/833857/

Change-Id: I5fe60181058ef90dd496318cf270e0825bcc411a
2016-01-20 21:56:50 -08:00
Fyodor Kupolov
e2239c9346 Explicitly pass userId to getWindowToken
UiAutomationConnection.clearWindowContentFrameStats method currently clears
calling identity before calling mAccessibilityManager.getWindowToken. This
doesn't work properly when a call is made by a secondary user, because it
wouldn't pass a check in getWindowToken. This is now fixed by explicitly
passing ID of the calling user.

Bug: 26498396
Change-Id: I8f0cdde33e18f04adb1833c6c0d0c329de921018
2016-01-12 16:46:13 -08:00
Zach Kuznia
7ef1e7ffbc Merge "Renable split tapping while in Touch Explore mode." 2016-01-12 19:34:48 +00:00
Zachary Kuznia
a70778f1c9 Renable split tapping while in Touch Explore mode.
b/26496116

Change-Id: I9c819e8d3fb2332120b143cf074c0d7cc3921eae
2016-01-11 16:50:30 -08:00
Phil Weaver
a6b64f5099 Gesture dispatch from accessibility services.
Add public APIs to describe gestures and dispatch them from
an accessibility service. Added a new capability that
services must declare to have this capability.

Bug: 22514086

Change-Id: I9bff2d9335f0310115112d14b7ed033a6d6c2393
2016-01-11 09:32:43 -08:00
Jason Monk
08e7fa9b69 Allow color matrix to be controlled by secure setting
Change-Id: Ia5518ad79fae502e814034edd7ae8d7a57b3eaeb
2015-12-08 07:27:15 -05:00
Phil Weaver
14ed6cf3e7 Ignore feedbackType in AccessibilityEvent dispatch
Send AccessibilityEvents to all accessibility services
that request them. No longer refuse to send them to
services with the same feedback type.

Change-Id: I137905c24fc75c075ab938175ecb6ea5f39112cf
2015-11-30 14:36:34 -08:00
Phil Weaver
b76bbd8e50 Merge "Dispatch key events to multiple a11y services." 2015-11-20 21:55:53 +00:00
Phil Weaver
5915658c88 Dispatch key events to multiple a11y services.
Introducing a new class to manage key event dispatch
that sends all events to all classes that request them.

Bug:22332500, 22515057
Change-Id: I8521f6257a4ac6c8f2eff14186789630d680ff11
2015-11-20 13:43:02 -08:00
Alan Viverette
214fb68767 APIs for querying and controlling display magnification
Also separates magnification state and touch event handling. Moves
callbacks for window manager changes and display state changes into
the magnification controller.

Bug: 22718911
Change-Id: I3a8ba060a07d8f1f51856855a5f85601766fd45d
2015-11-17 09:48:25 -05:00