179 Commits

Author SHA1 Message Date
Phil Weaver
4b88bddb12 Merge "Fix a11y key event handling from multiple devices." into nyc-dev 2016-04-21 01:38:49 +00:00
Phil Weaver
698c96dbd2 Fix a11y key event handling from multiple devices.
For M, we ignored device type entirely, but with ag/760625 we started
paying attention to it, which rejects events when keys from different
devices are pressed simultaneously. Since the volume keys show up as
different devices, the new behavior disrupted the event stream when
both volume keys were pressed.

Now tracking each device separately, which restores the old behavior
but still takes the device id into account. Holding down two keys
when enabling an accessibility service, however, always has and still
can produce an invalid event stream. It doesn't seem worth the
overhead, however, to track each key separately.

Bug: 28091773
Change-Id: I8d30de1f5e05f779b6fe305856d42f209ff8b038
2016-04-20 13:08:35 -07:00
Phil Weaver
b72c30653d Merge "Clear calling identity when binding a11y services" into nyc-dev 2016-04-20 16:33:28 +00:00
Phil Weaver
13ce4693d3 Clear calling identity when binding a11y services
When a UiAutomation is destroyed, accessibility services may get
enabled as a side effect. That was causing these services to be
enabled in a binder thread, which threw a SecurityException.

Bug: 28268310
Bug: 28163652
Change-Id: Ie25ab05569b5b21b5f30e7d7eed24ef73b7ba159
2016-04-19 17:07:20 -07:00
Adrian Roos
f2efdd8c7c Fix unprotected StatusBarManagerService calls
Some Binder calls in StatusBarManagerService were
left unprotected. They had no business being binder
calls in the first place, so they got moved to
StatusBarManagerInternal.

Bug: 28222649
Change-Id: Ib26dcca413eb642ba8cd6a4482bf13071f8bd3ab
2016-04-18 13:36:40 -07:00
Svetoslav Ganov
7d477d4845 Properly notify magnification listener
bug:28088856

Change-Id: Iffd848082f035319aab3af177921bb3085844ab0
2016-04-15 14:30:47 -07:00
Svetoslav Ganov
33f576b9e9 Merge "Ensure injected gestures respect magnification" into nyc-dev 2016-04-13 22:09:18 +00:00
Svetoslav Ganov
416bba7b46 Ensure injected gestures respect magnification
Change-Id: Ie828f4be4eb1ec620549c1346ec7cc335908612f
2016-04-13 15:03:51 -07:00
Svetoslav Ganov
0a59531581 Fix a regression in magnification center x,y
bug:28133561

Change-Id: If37baa5f2ebe5840b50ca845bf81ce70cedf0412
2016-04-12 18:02:54 -07:00
Phil Weaver
af93306a3d Merge "Reduce unnecessary accessibility cache clearing." into nyc-dev 2016-04-08 22:33:33 +00:00
Phil Weaver
e37cfab6c6 Reduce unnecessary accessibility cache clearing.
Tracking if accessibility focus is being cleared because it is being
set to another view in the same window. In this case, leave
accessibility focus on the window.

This change greatly reduces the amount of cache re-indexing.
Previously we flushed the cache every time accessibility focus moved.

Bug: 28077283
Change-Id: If80899d36e7f58b22635f844bdd4ea37a55b875e
2016-04-08 13:06:44 -07:00
Anna Galusza
21cafcd662 Merge "Fix issue where (accessibility) keyboard mode callbacks were not always called. Bug: 28007101" into nyc-dev 2016-04-08 17:06:10 +00:00
Phil Weaver
fb6dd3bbc1 Merge "Treat accessibility gestures like physical ones." into nyc-dev 2016-04-07 20:34:34 +00:00
Phil Weaver
155dda1e43 Treat accessibility gestures like physical ones.
Gestures now operate on the screen as the user sees it, so they are
affected by magnification. This makes gesture coordinates consistent
with the node bounds in screen and makes an eye or head tracking service
work much more easily.

Bug: 27747314
Change-Id: Idee60398d49d8c9af7405d974893c796b034c974
2016-04-07 12:20:27 -07:00
Phil Weaver
445fd2afe9 Eliminate deadlock in magnification.
Use the lock from AccessibilityManagerService in
MagnificationController, since the two services call each other with
locks held.

Bug: 27725795
Change-Id: Iaed6749bf217210457325c3912da0f7aa0f6319a
2016-04-06 16:43:44 +00:00
Anna Galusza
c9eab5fa90 Fix issue where (accessibility) keyboard mode callbacks were not always called.
Bug: 28007101

Change-Id: Ie7f992243e5a71bc6fed74cbc0d242d652d7fc12
2016-04-06 09:31:40 -07:00
Anna Galusza
cd1e9ad83c Merge "Fix bug where service disabled with disableSelf() would not reset soft keyboard behavior. Bug: 27947344" into nyc-dev 2016-04-04 19:19:32 +00:00
Anna Galusza
8a12f640fc Fix bug where service disabled with disableSelf() would not reset soft keyboard
behavior.
Bug: 27947344

Change-Id: I19583cad14616416be3582c30653d244a27aa366
2016-04-04 09:59:27 -07:00
Phil Weaver
d4a1932608 Merge "Add accessibility window title and anchor." into nyc-dev 2016-04-04 16:36:01 +00:00
Jeff Sharkey
b5e89c6deb Support direct-boot tests.
Add shell commands to check on current FBE status and system ready
status.  Mark variables without first-class locking as volatile.

Fix bug where UI automation would crash while device was locked by
marking it as forced direct-boot aware.

Bug: 26498834
Change-Id: Ib4dfb9350925e5413f93a09baacf84c62f2ba0ea
2016-04-02 19:31:19 -06:00
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
Phil Weaver
396d549113 Add accessibility window title and anchor.
Plumbing through the title of windows so support multiwindow
accessibility.

Adding ability to determine the anchor of a pop-up window so the pop-up
can be traversed as part of its anchor.

Bug: 27687627
Bug: 8449376

Change-Id: I59e98a29fb90029407a26de5bf3d900fed5dd627
2016-03-29 08:41:09 -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