• Home
  • History
  • Annotate
  • only in /frameworks/base/core/java/android/view/accessibility/
History log of /frameworks/base/core/java/android/view/accessibility/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
48a5ed5617067b52676c26b9230ce5b75946984b 29-Jan-2015 Svetoslav <svetoslavganov@google.com> AccessibilityNodeInfo refresh returns a stale state. - DO NOT MERGE

AccessibilityNodeInfo refresh was getting the latest cached
state but this is not good enough as an accessibility service
can execute an action on the node and then refresh it to get
the new state.

bug:16954787

Change-Id: I004b4987b8dc423a2ab7031a4fbfe64365ddd7fe
(cherry picked from commit 5738fec00db65e0ee246475a7236e57ba3ee8d55)
ccessibilityNodeInfo.java
27ad2e95b40fd0ca76de384695498ea114d627ca 13-Feb-2015 Svetoslav <svetoslavganov@google.com> Accessibility: Ensure fresh accessilbity focused and input focused nodes.

Change-Id: Ia3c84284843a415cdbbc2b6a9b06d9ddffbe0e04
ccessibilityCache.java
ded133c446fa9d0d23e6bde19a66fb2ce3980491 31-Jan-2015 Svetoslav <svetoslavganov@google.com> Fix broken activation of the selected view in accessibility mode.

We were using an approximation to determine where to send a pair of down
and up events to click on the view that has accessibility focus. We were
doing reverse computation to figuring out which portion of the view is
not covered by interactive views and get a point in this region. However,
determining whether a view is interactive is not feasible in general since
for example may override onTouchEvent. This results in views not being
activated or which is worse wrong views being activated.

This change swithes to a new approach to activate views in accessibility
mode which is guaranteed to always work except the very rare case of a
view that overrides dispatchTouchEvent (which developers shouldn't be
doing). The new approach is to flag the down and up events pair sent
by the touch explorer as targeting the accessibility focused view. Such
events are dispatched such that views predecessors of the accessibility
focus do not handle them guaranteeing that these events reach the accessibiliy
focused view. Once the accessibiliy focused view gets such an event it clears
the flag and the event is dispatched following the normal event dispatch
semantics.

The new approach is semantically equivalent to requesting the view to perform
a click accessiblitiy action but is more generic as it is not affected by
views not implementing click action support correctly.

bug:18986806
bug:18889611

Change-Id: Id4b7b886c9fd34f7eb11e606636d8e3bab122869
ccessibilityInteractionClient.java
AccessibilityInteractionConnection.aidl
AccessibilityInteractionConnectionCallback.aidl
e5ea48a7fe295a2815bab57f2e870901ce48b312 29-Dec-2014 Svetoslav <svetoslavganov@google.com> Fix a race in accessibility manager.

The accessibility manager has APIs for clients to observe changes
in accessibility, touch exploration, and high contrast states. The
notification of the listeners has to be done with no lock held but
in an attempt to do that the code was incorrectly iterating over
the copy on write collection.

bug:18840784

Change-Id: I6803ff1657fbf6b0cc7936671d5bbdebb5cbf6bb
ccessibilityManager.java
0322100598e3afae207bb98202b9ce53604bdb28 06-Dec-2014 Svet Ganov <svetoslavganov@google.com> Clear clicked nodes from the accessibiliy cache.

Nodes that are clicked can change state as a result of a click,
e.g. a check box. The accessibility service may decide to get the
source node from the click event to probe its state and get a
cached state since the window content changed event is after the
click one. Therefore, we have to clear the state of the click
event's source from the cache to ensure the client can query the
latest state of that source.

bug:18625975

Change-Id: I9e339c2fdcf74f260bb8ad86b9b873f7ddd75f19
ccessibilityCache.java
6c70290ff0b20329c8f173d5c3423eb83ddc46f1 10-Oct-2014 Svetoslav <svetoslavganov@google.com> Adding APIs to enable apps to influence accessibility traversal.

Accessibility focus is a token that can be put on any view and is
entirely controlled by accessibility services which decide whether
to put accessibility focus on a given view and what the traversal
strategy is.

Currently accessibility service use the view tree structure for
traversal which does not always reflect the logical order and the
user experience is sub-optimal. In such cases apps should be able
to influence how they are traversed for accessibility.

This change adds the notion of an accessibilty traversal order.
If a view has next in the traversal, an accessibility service has
to traverse the content of this view before traversing the content
next one.

This change will enable accessibility service to move away from
using the view tree and use spatial location of the content while
app developers can also influence the treversal order.

bug:17319923

Change-Id: Ib67ae4577f30b2c96575c71538dc1afdea08bfd3
ccessibilityNodeInfo.java
3a5c721072c60c7ed9c8a95d0a65d0e3cb4eb9bb 14-Oct-2014 Svetoslav <svetoslavganov@google.com> APIs for an accessibility service to put interaction tracking overlays.

An accessibility service may register to observe the interactive windows
on the primary display. These windows are the one that has input focus and
ones a sighted user can touch. It is sometimes beneficial for an
accessibility service to overlay a window to intercept user interaction
and based on that introspect and perform an action on the windows that
are on the screen. This is problematic as overlaying a full screen window
that is touchable prevents the accessibility service to introspect the
content under this window.

This change adds a special type of window that only an accessibility service
can place which does not affect what an accessibility service can "see" on
the screen. Hence, even putting such a window full screen the service will
be able to interact with the other interactive windows it covers.

Change-Id: I053ccc3a5c6360a98dc40bdb172b54dab35d8b31
ccessibilityWindowInfo.java
13bd771c993f96a06add4057c5f5d5be7ac4b42a 20-Sep-2014 Svetoslav <svetoslavganov@google.com> Fix memory leak in accessibility cache.

We were not clearing the cache if window state change event
is fired which was the behavior before adding the window
inspection APIs. As a result if no accessibility service
cares about windows we get a leek. Also when the accessibiilty
service cares about windows we were not clearing all windows
nodes from the cache. Now if a windows change or a window
state change event is recived we clear the cache.

bug:17589257

Change-Id: I8c416fbcab623160c6f505128b9fca713fcc6623
ccessibilityCache.java
f1820064d9cfcf43e4cfd16872acca3bf5a7d94b 17-Sep-2014 Alan Viverette <alanv@google.com> Ensure we always have valid colors in CaptionStyle

BUG: 17521623
Change-Id: I861aa189970fc14dd3e4426e5487a14f373d3a2e
aptioningManager.java
7498efdc5e163d6b4a11db941c7d13c169d37284 04-Sep-2014 Svet Ganov <svetoslavganov@google.com> Clicking on partially coverd views by other views or windows.

In touch exploration mode an accessibility service can move
accessibility focus in response to user gestures. In this case
when the user double-taps the system is sending down and up
events at the center of the acessibility focused view. This
works fine until the clicked view's center is covered by another
clickable view. In such a scenario the user thinks he is clicking
on one view but the click is handled by another. Terrible.

This change solves the problem of clicking on the wrong view
and also solves the problem of clicking on the wrong window.
The key idea is that when the system detects a double tap or
a double tap and hold it asks the accessibility focused node
(if such) to compute a point at which a click can be performed.
In respinse to that the node is asking the source view to
compute this.

If a view is partially covered by siblings or siblings of
predecessors that are clickable, the click point will be
properly computed to ensure the click occurs on the desired
view. The click point is also bounded in the interactive
part of the host window.

The current approach has rare edge cases that may produce false
positives or false negatives. For example, a portion of the
view may be covered by an interactive descendant of a
predecessor, which we do not compute (we check only siblings of
predecessors). Also a view may be handling raw touch events
instead of registering click listeners, which we cannot compute.
Despite these limitations this approach will work most of the
time and it is a huge improvement over just blindly sending
the down and up events in the center of the view.

Note that the additional computational complexity is incurred
only when the user wants to click on the accessibility focused
view which is very a rare event and this is a good tradeoff.

bug:15696993

Change-Id: I85927a77d6c24f7550b0d5f9f762722a8230830f
ccessibilityInteractionClient.java
AccessibilityInteractionConnection.aidl
AccessibilityInteractionConnectionCallback.aidl
9ae9ed24aa252acbc2e6288068b991dd5291967b 03-Sep-2014 Svetoslav <svetoslavganov@google.com> Fix AccessibilityNode's isVisibleToUser behavior.

The isVisibleToUser property of an AccessibilityNodeInfo specifies
whether the user can see the source view. It is used by accessibility
services to figure out whether to focus on a view. This property
was giving a wrong value if the view is covered by another window
such as the keyboard. As a result the user hears one thing but when
double taps interacts with the overlaid window which is another thing.

bug:15938254

Change-Id: Ib9feb20ea422a24a512c47ed1234961ae0386a7f
AccessibilityInteractionConnection.aidl
04cab1bcc46b05cbb72632c53ad83943f705b494 26-Aug-2014 Svetoslav <svetoslavganov@google.com> Fix accessiblity CTS tests (framework).

1. An external contribution changed the ordering of views for
accessibility. While it attempted to fix a platform issue
for a comparator breaking transitivity, it changed the way
we order views and results in very unnatural accessibility
traversal order. It also broke CTS tets. This change tweaks
the comparator which fixes the tests and improves traversal
order.

2. If there is at least one accessibility service which cares
about windows we register a callback in the window manager
for window change notifications. We are updating the window
list on this callback. There was a case where if the service
requests window updates and immediately asks for the windows
it gets none as we have not received a callback from the
window manager yet. Now this call returns after we get the
callback in a timed fashion. This is consistent with how the
other introspection APIs work.

3. Window info objects are cached in the accessibility service
process. When putting them in the cache a cloning call was
missing resulting in some cases of clobbering windows given
to the client. For example, we get some windows, cache them,
and return these windows to the client. Now a call to clear
the cache arrives while the user processes the windows and
the client windows get clobbered.

4. Added API for checking if a window has accessiblity focus
to be consistent to the API we have to check whether this
window has input focus.

5. Removed some obsolete code.

bug:16402352

Change-Id: Ided6da4a82cc0fc703008c58a2dff0119a3ff317
ccessibilityCache.java
ccessibilityWindowInfo.java
79dea425af818c3fe1d4edb0af7ad301cdd621a4 09-Aug-2014 Svet Ganov <svetoslavganov@google.com> Check accessibility cache integrity only on eng builds.

The checks may have false ositives and spam test logs.

bug:1689853:

Change-Id: I576600192823f159e28ecea29f888187eeceb98b
ccessibilityCache.java
029942f77d05ed3d20256403652b220c83dad6e1 12-Aug-2014 Alan Viverette <alanv@google.com> Add API for obtaining max text length for accessibility

BUG: 16736956
Change-Id: I15ffb9bf68e074adf3e0dbcd230367e115c03e3c
ccessibilityNodeInfo.java
c946f14a67f36d398f30040976ec6e7baf2643ac 05-Aug-2014 Svet Ganov <svetoslavganov@google.com> Properly update accessibility manager state.

Applciations that fire accessibility events have to first check
it accessibility is on and then fire the event. If the app fires
an event when the feature is off an exception is thrown. However,
due to the way accessibility state is pushed to the local
accessibility manager it was possible that the app checks that
aaccessibility is off, fires an event, then the state of the
local manager changes by the time the event is propagated up
the view tree and an exception is thrown. This is a regression.

We really want this exception to prevent apps sending events
across processes if accessibility is off, so now the state
we get from the system manager service is applied via a
message so if the app checks that accessibility is off, then
it will remain off (locally) until the event is propagated.

bug:16672964

Change-Id: Icf5d1b1bdff87b58f285f0d9e1a098552513bbe8
ccessibilityManager.java
a4725efd0bfa52cbddf6ca587d37fc4ebcbfaf72 24-Jul-2014 Svetoslav <svetoslavganov@google.com> Improve the window query API performamce.

We are caching the window data in the accessibility service process.
When windows change we were sending the dalta of the windows the
service knows about. To make this work when the app asked for all
windows we had to call into the system as new windows may have
appeared. This was slow.

Now we are telling the service some windows change and if it gets
the windows we cache them. We call into the system only on a cache
miss and evict all windows from the cache on window change event.
We do not evict the nodes of the window as the former may have
just moved. If views in a window change they fire accessibility
events that trigger the correct eviction.

Change-Id: I586a72a2497b0d44a75288fa758e7e88817f3300
ccessibilityCache.java
ccessibilityInteractionClient.java
f7c42c506796b8d828fbd1233edb9752a1f50e12 24-Jul-2014 Svetoslav <svetoslavganov@google.com> Updated accessibility nodes not properly cached.

We have an accessibiliy node info cache in the process of each
accessibility service. Sometimes the cached node changes and
in this case we have evict from the cache the sub-trees rooted
at children that are no longer present. There was bug where if
none of the children is present anymore we did not evict their
sub-trees.

Also the verification logic was not stopping if a duplicate
node is seen potentially getting into an infinite loop.

bug:15729762

Change-Id: I7adf4f0a1bde07b385556d9acdded5059231f1f3
ccessibilityCache.java
cce47eb580d666ead1f6095d1e3b65233592bbaa 17-Jul-2014 Chris Craik <ccraik@google.com> Add accessibility text contrast setting

b/14624452

Adds a feature which draws all text (in the HW accelerated standard
path) in a high contrast mode. Text is drawn at full alpha, and either
white or black (depending on its original color) with a starkly
contrasted outline beneath it.

Change-Id: I943f624b6367de35367cced3b2a8298f2bc62377
ccessibilityManager.java
fccbff5f021a6f95fe1c18f55866545c767ef8eb 08-Jul-2014 Alan Viverette <alanv@google.com> Add API on AccessibilityNodeInfo for retrieving TextView error

BUG: 11155198
Change-Id: Ie01b92e1071ff584b360cfa3ece4320ad05e4aae
ccessibilityNodeInfo.java
e16a5009cc02548266e483ee2456c631914519ac 11-Jun-2014 Svetoslav <svetoslavganov@google.com> Accessibility window changes not reported.

On accessibility service side we were asking only for cached windows but since
to optimize performance the system is sending only deltas for windows the service
already introspected, new windows were not seen by the accessibility service.

bug:15092286

Change-Id: I7e9c360f624c53ff1773c485a8907dc425e3352a
ccessibilityInteractionClient.java
e88aee8ad85b01229b12dbc0c3cc2f0b8b490192 05-Jun-2014 Alan Viverette <alanv@google.com> Add defaults for caption colors and edge type

BUG: 8151470
Change-Id: I4d7b75bf647aeded77b4000cdcd37e9ace46a374
aptioningManager.java
5c4cd189f298b3ddb9a5e8afc5f68546a9f96726 21-May-2014 Svetoslav <svetoslavganov@google.com> Fixing bugs due to the new custom accessibility action APIs.

1. AccessibiltiyAction was incorectly throwing an exception when
a custom action was constructed.

2. AccessibilityManagerService should no longer enforce only standard
actions as we allow custom ones too.

bug:15110963

Change-Id: Iea57e0a6449b87bd8d103c55ca255e80705f2565
ccessibilityNodeInfo.java
8d5f3fa6455c1eedb4f31bbaf075f2c1f9a2887a 20-May-2014 Kristian Monsen <kristianm@google.com> Consider addAction(int action) to possibly be a bit mask

bug=15092606

Change-Id: I885808b3f4d2337129d1660300be8e926f8a8425
ccessibilityNodeInfo.java
74bc19476536f2b5462eaa29e6f3029ee897c16d 29-Apr-2014 Kristian Monsen <kristianm@google.com> Adding custom events to AccessibilityNodeInfo

Change-Id: Id7a1985d1a6c4a9f7153f6d4d7e45f80c8d2b2b0
ccessibilityNodeInfo.java
1e0d4af9986c8c2a658769a63bf8b385d25e0435 11-Apr-2014 Svetoslav <svetoslavganov@google.com> Adding system support for a single accessibility focus.

Now that we have APIs to query all interactive windows and allow
an accessibility service to put accessibility focus in each of
them we have to guarantee that there is a single accessibility
focus. This is required for correct operation of the touch
explorer as on double tap in clicks in the center of the focused
area, hence having more that one focus is an issue. Also the
system is maintaining a single input focus so now accessibility
focus behaves consistently with that.

bug:13965563

Change-Id: I0b5c26dadfabbf80dbed8dc4602073aa575ac179
ccessibilityInteractionClient.java
ccessibilityNodeInfo.java
1376d600d8e0eefdbc0aa11d398cf7517fc77129 13-Mar-2014 Svetoslav <svetoslavganov@google.com> Adding render stats APIs to UiAutomation (framework).

bug:12927198

Change-Id: Iae21481c75ae58dcdab3731bf5f1e2844e29d434
AccessibilityManager.aidl
576b6f2c25ab388e9dbc3bfc4df445ca648e7253 20-Mar-2014 Baligh Uddin <baligh@google.com> Fix Build
ccessibilityManager.java
a053d095ae9d49aa22a0c717bb6ede687feb3fd2 20-Mar-2014 Svetoslav <svetoslavganov@google.com> Fix build

Change-Id: Icde98afd1471295320dc9042e1ecf680bb88ebd2
ccessibilityManager.java
8e3feb15c5aec2c72b0ef120a1da325e1e8f0dda 24-Feb-2014 Svetoslav <svetoslavganov@google.com> Added accessibility APIs for introspecting interactive windows.

1. The old introspection model was allowing querying only the active window
which is the one the user is touching or the focused one if no window is
touched. This was limiting as auto completion drop downs were not inspectable,
there was not way to know when the IME toggles, non-focusable windows were
not inspectable if the user taps them as until a screen-reader starts
introspecting the users finger is up, accessibility focus was limited to
only one window and the user couldn't use gestures to visit the whole UI,
and other things I can't remember right now.

The new APIs allow getting all interactive windows, i.e. ones that a
sighted user can interact with. This prevents an accessibility service
from interacting with content a sighter user cannot. The list of windows
can be obtained from an accessibility service or the host window from an
accessibility node info. Introspecting windows obey the same rules for
introspecting node, i.e. the service has to declare this capability
in its manifest.

When some windows change accessibility services receive a new type
of event. Initially the types of windows is very limited. We provide
the bounds in screen, layer, and some other properties which are
enough for a client to determined the spacial and hierarchical
relationship of the windows.

2. Update the documentation in AccessibilityService for newer event types.

3. LongArray was not removing elements properly.

4. Composite accessibility node ids were not properly constructed as they
are composed of two ints, each taking 32 bits. However, the values for
undefined were -1 so composing a 64 long from -1, -1 prevents from getting
back these values when unpacking.

5. Some apps were generating inconsistent AccessibilityNodeInfo tree. Added
a check that enforces such trees to be well formed on dev builds.

6. Removed an necessary code for piping the touch exploration state to
the policy as it should just use the AccessibilityManager from context.

7. When view's visibility changed it was not firing an event to notify
clients it disappeared/appeared. Also ViewGroup was sending accessibility
events for changes if the view is included for accessibility but this is
wrong as there may be a service that want all nodes, hence events from them.
The accessibility manager service takes care of delivering events from
not important for accessibility nodes only to services that want such.

8. Several places were asking for prefetching of sibling but not predecessor
nodes which resulted in prefetching of unconnected subtrees.

9. The local AccessibilityManager implementation was relying on the backing
service being ready when it is created but it can be fetched from a context
before that. If that happens the local manager was in a broken state forever.
Now it is more robust and starts working properly once the backing service
is up. Several places were lacking locking.

bug:13331285

Change-Id: Ie51166d4875d5f3def8d29d77973da4b9251f5c8
ccessibilityCache.java
ccessibilityEvent.java
ccessibilityInteractionClient.java
ccessibilityManager.java
ccessibilityNodeInfo.java
ccessibilityNodeInfoCache.java
ccessibilityNodeProvider.java
ccessibilityRecord.java
ccessibilityWindowInfo.aidl
ccessibilityWindowInfo.java
375e23a6bcbe5a2560cd4d5fe0140f70949e0989 04-Mar-2014 Svetoslav <svetoslavganov@google.com> NPE in AccessibilityNodeInfoCahce.

Change-Id: I2401e40842ef4ae47bba0a30a5e2589c11e488bc
ccessibilityNodeInfoCache.java
1100714350923fb96d825bacd4809df2c97bea3d 04-Mar-2014 Svetoslav <svetoslavganov@google.com> Reverting changes to the accessibility layer.

1. Views not important for accessibility should still fire accessibility
events as some accessibility service may be registered to introspect
all views.

2. Reverting a correct fix from AccessibilityNodeInfoCache to port it in
a separate change for cherry-pick.

Change-Id: If768259597ed1c884952209dad948c46dff14878
ccessibilityNodeInfoCache.java
4cd353c038ec3c21f25c12897992e5e9826fe824 13-Feb-2014 Guang Zhu <guangzhu@google.com> add new accessibility action for EditText to set text content

Bug: 12872344
Change-Id: I85a3805ab0c34b96a7d4228f2382c8ff664e36e8
ccessibilityNodeInfo.java
7d57765db927d8803bd8898463cc6f9979b6bf35 14-Feb-2014 Alan Viverette <alanv@google.com> Merge "Add selection properties to CollectionInfo, CollectionItemInfo"
32569caa6ac77ad6a93709985815ae9ee76a8f06 13-Feb-2014 Guang Zhu <guangzhu@google.com> reduce error logs from disconnected AccessibilityNodeInfo's

ChromeView generates a large amount of such logs; while the real
root cause is being fixed, reduce the verbosity so other
interesting logs won't get overwritten.

Bug: 10871032
Change-Id: If42116671062d7b2cc2a13384424575da499c493
ccessibilityNodeInfoCache.java
76769ae02e713f50816ee67ff618b748d95050a8 13-Feb-2014 Alan Viverette <alanv@google.com> Add selection properties to CollectionInfo, CollectionItemInfo

BUG: 12552541
Change-Id: Iae10abc02eeffea7c7fcb25020b343181e1e3482
ccessibilityNodeInfo.java
cdd2eddcb288763341172ead488e92cafb19bab6 12-Feb-2014 Alan Viverette <alanv@google.com> Set properties for pooled CollectionItemInfo, CollectionInfo

BUG: 12978446
Change-Id: I64a366952090ab663ffef43a1d210528805e113c
ccessibilityNodeInfo.java
c0877962b3dc49edb42aeda766593123c81613f1 22-Jan-2014 Svetoslav Ganov <svetoslavganov@google.com> Adding the print and accessibility pacelables to framework.aidl

1. There are a few parcelable classes related to printing and accessibility
which are public but not added in the framework.aidl list so third parties
cannot write aidl interfaces that pass these classes. As these classes
are public it is resonable for devepers to be able to pass them between
processes.

Change-Id: I85da1de5198902b74f19d23e3fe16b45b4a11051
ccessibilityRecord.aidl
ca7a2576289f371acc28e39825a2fe05a587b29b 20-Dec-2013 Alan Viverette <alanv@google.com> Merge "Add APIs and implementation for additional caption edge types"
49782e46c0eb85a25ae2abcf80880c48dbab5aea 20-Dec-2013 Amith Yamasani <yamasani@google.com> am 9158825f: Move some system services to separate directories

* commit '9158825f9c41869689d6b1786d7c7aa8bdd524ce':
Move some system services to separate directories
9158825f9c41869689d6b1786d7c7aa8bdd524ce 22-Nov-2013 Amith Yamasani <yamasani@google.com> Move some system services to separate directories

Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
ccessibilityManager.java
ce32ea7345f0157a595b1dd4306a9a65f444d7c2 19-Dec-2013 Alan Viverette <alanv@google.com> Add APIs and implementation for additional caption edge types

Change-Id: I62d97a0b3e3b751d698a889eec80dc79fb908d7a
aptioningManager.java
f8bc964289df5ea53672df401c6d51dd47c02e53 26-Nov-2013 Svetoslav <svetoslavganov@google.com> Fixing some accessibility bugs.

1. Views not important for accessibility should not send events.

2. The base View implementation should not add it self to the
list of children for accessibility.

3. Null pointer exception in AccessibilityNodeInfoCache.

Change-Id: Ie5b373362269200ead13ffe632679bd42ee40309
ccessibilityNodeInfoCache.java
55d70620d9fda8afafb2fdec59757a710eec0e89 12-Dec-2013 Alan Viverette <alanv@google.com> Add caption window color attribute

The WebVTT rendering implementation interprets window color as region
color, since there is no window for non-region captions.

BUG: 12020757
Change-Id: Ie891e1343d718783fc32c712860f886de22558ec
aptioningManager.java
6090995951c6e2e4dcf38102f01793f8a94166e1 19-Nov-2013 John Spurlock <jspurlock@google.com> Remove unused imports from frameworks/base.

Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
ccessibilityInteractionClient.java
ccessibilityNodeInfoCache.java
f0aed09ed8153043e40b3ac99788d47ba0831306 07-Nov-2013 Alan Viverette <alanv@google.com> Add methods for removing children and actions from A11y nodes

BUG: 11421730
Change-Id: Ide396e6a0fec871395a9cadf8880c16d0de08294
ccessibilityInteractionClient.java
ccessibilityNodeInfo.java
ccessibilityNodeInfoCache.java
200223cd0e0d91e6575ee29c92a45aeb288c19ce 18-Oct-2013 Scott Main <smain@google.com> am 24512c85: am 6f756e56: am 96844ed8: fix javadoc link

* commit '24512c8586f8a3e0d3c9bff07639f968fe1b3e25':
fix javadoc link
96844ed886cc887a34bfc2fd04fc569d9c098623 18-Oct-2013 Scott Main <smain@google.com> fix javadoc link

Change-Id: I509fb12393ee0b8bf78ff4110fc18420739f7c58
ccessibilityNodeInfo.java
502cb33f8d13b23c8ddfb1a53db7472404215560 16-Oct-2013 Alan Viverette <alanv@google.com> Lazily create AccessibilityEvent record list

Change-Id: Id4e0a403da811498f2b0f748d86e330fff774154
ccessibilityEvent.java
46b2cc1323c643a5f199dca7584bdd8811563c3e 10-Oct-2013 Alan Viverette <alanv@google.com> am 66b5b5b2: am cb38a97c: am 90abd6d1: Merge "Ensure accessibility node cache is synced with service state" into klp-dev

* commit '66b5b5b2b74baa9b7c26d5d72eaa2b6f9f5675dc':
Ensure accessibility node cache is synced with service state
90abd6d1dfe883efc4a305db45f6812ea0de1d7b 10-Oct-2013 Alan Viverette <alanv@google.com> Merge "Ensure accessibility node cache is synced with service state" into klp-dev
a393d6750ceb1b2508a77cedfd343d07bcebe43e 10-Oct-2013 Alan Viverette <alanv@google.com> am 1cac53fa: am b8a140f3: am 1e2b6438: Merge "Fix accessibility state callbacks" into klp-dev

* commit '1cac53fa63060ec3fa3b0249b941ccf8544b3333':
Fix accessibility state callbacks
7e361d22e3ceb7dac79acd1cf3567de86eb045bc 10-Oct-2013 Alan Viverette <alanv@google.com> Fix accessibility state callbacks

BUG: 11141708
Change-Id: Ieff1fb90c4f894eba3c203089dd61e1dabdb7982
ccessibilityManager.java
3d1c5a7236c4709550ca7c0cfa293fc5c974c56b 10-Oct-2013 Alan Viverette <alanv@google.com> Ensure accessibility node cache is synced with service state

BUG: 11152210
Change-Id: Ibffd2909b6b06568de9344e536a200d8a7abac9d
ccessibilityNodeInfoCache.java
359404288c441904d636d48094669fcf66d49308 10-Oct-2013 Alan Viverette <alanv@google.com> am 9f57774e: am 972de252: am 24305da7: Merge "Add listener for changes to touch exploration state" into klp-dev

* commit '9f57774ebb3b400b6597a9dbe854b4b6b1c8afd4':
Add listener for changes to touch exploration state
24305da7d66682930764e77695a884dd78b49039 10-Oct-2013 Alan Viverette <alanv@google.com> Merge "Add listener for changes to touch exploration state" into klp-dev
5baeb9ad1e68cd1bdd0df0c14fe284a1660e2ee6 09-Oct-2013 Alan Viverette <alanv@google.com> Add listener for changes to touch exploration state

BUG: 11141708
Change-Id: I353dfa2542ebd5e2ac89029dcd88623cc4c688e7
ccessibilityManager.java
67c8d20ed28e0b75de50fc8353a132b8404310b6 09-Oct-2013 Svetoslav <svetoslavganov@google.com> am fdcd50f1: am 53f16ba2: am 0cc8276d: Merge "Add missing locking when updating the accessibility node info cache." into klp-dev

* commit 'fdcd50f13d961514ed1a47573b627b6b3184c1fc':
Add missing locking when updating the accessibility node info cache.
3edcd8cfdf5faa1c229c3b2edde2fe3c722f175d 09-Oct-2013 Svetoslav <svetoslavganov@google.com> Add missing locking when updating the accessibility node info cache.

bug:10489954

Change-Id: Iccf55d074ea712566f441b9f6616a4c1fe847e0a
ccessibilityNodeInfoCache.java
550b89e6de08731249b87ef3e9250306107d810c 08-Oct-2013 Alan Viverette <alanv@google.com> am 80fad292: am 6d774ac6: am bdae8148: Merge "Provide example actions in AccessibilityEvent.setAction() docs" into klp-dev

* commit '80fad292318ac2e1e76435bb8334017a702a62d7':
Provide example actions in AccessibilityEvent.setAction() docs
af43110c020a9557233a64c08cede07bb37fe440 04-Oct-2013 Alan Viverette <alanv@google.com> Provide example actions in AccessibilityEvent.setAction() docs

BUG: 11070461
Change-Id: I05799e721dd1285e5165e94c7d63084010fa478b
ccessibilityEvent.java
87c9f89412f67f3a0dbaacf6585dbed3dc388442 02-Oct-2013 Alan Viverette <alanv@google.com> am e3ba7f24: am c379752a: am 3320ef95: Merge "Add findFocus API for AccessibilityNodeProvider" into klp-dev

* commit 'e3ba7f24dacfc8ef16e2f297fe3eec3c0719bfd1':
Add findFocus API for AccessibilityNodeProvider
410d4e33c5542ccdeacdc8d0ac4aa0e194da688a 01-Oct-2013 Alan Viverette <alanv@google.com> Add accessibility display adjustments

BUG: 9057596
Change-Id: I5e7cc05159387cb00701e162d015e2f7ca6cbf4c
ccessibilityManager.java
2e1e081146546a04bc3813dde9c44babbddc0712 30-Sep-2013 Alan Viverette <alanv@google.com> Add findFocus API for AccessibilityNodeProvider

BUG: 9372171
Change-Id: Iea46ce5a4bf25baaabe5c07cd7d0c58bb31f23d9
ccessibilityNodeProvider.java
2a65a2839e9b3e59a72348ee088f86cda7df604a 13-Sep-2013 Alan Viverette <alanv@google.com> Merge "Add live region politeness to View, AccessibilityNodeInfo" into klp-dev
77e9a28e2faa36f127231b842476d47f9823a83a 13-Sep-2013 Alan Viverette <alanv@google.com> Add live region politeness to View, AccessibilityNodeInfo

Alters the content change API to contain a bit mask of types of
changes represented by the event. Live regions send CONTENT_CHANGED
events immediately. Removes unused APIs for EXPANDABLE/EXPANDED.

BUG: 10527284
Change-Id: I21523e85e47df23706976dc0a8bf615f83072c04
ccessibilityEvent.java
ccessibilityNodeInfo.java
ccessibilityNodeInfoCache.java
651dd4e6ee6510caf9f15c51094a11121af17ec2 12-Sep-2013 Svetoslav <svetoslavganov@google.com> Remove unneeded print APIs and update the min margins APIs.

1. Removed unneeded code in Resolution that was storing its
label as resource and package name. We do not have predefined
resolutions, therefore we always persist the label.

2. Renamed the print attribute margins to minMargins to reflect
that these are the minimal margins the printer support. Updated
the docs as well.

3. Renamed the create method of all builder to build.

bug:10727487

Change-Id: Ie72ab8aaa5215b8bd2853885011b3b4efa4deb2e
ccessibilityNodeInfoCache.java
3bbd3aea604e6132c95a2f1f6e10c993ecc70d8b 09-Sep-2013 Svetoslav Ganov <svetoslavganov@google.com> Merge "AccessibilityNodeInfo incorrectly cloned." into klp-dev
6685f1bacead5f765c71a49f5cf0dc88750344d5 09-Sep-2013 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityNodeInfo incorrectly cloned.

The code that creates a clone of an AccessibilityNodeInfo was not cloning
the extension objects (CollectionInfo, CollectionItemInfo, and RangeInfo)
and as a result if the original accessibility node info is recycled the
extension objects of the clone are also recycled and now if one tries to
recycle the clone gets an exception that the extension objects are already
recycled. Fun!

bug:10642952

Change-Id: I84192466bff0e865de04b79079e6ceecdffb37a6
ccessibilityNodeInfo.java
d43daf361e993457e64eeeddab6d1a0ebc828c99 06-Sep-2013 Alan Viverette <alanv@google.com> Add WebVTT caption renderer

Currently missing support for region anchor points, robust layout
when snapping to lines, and vertical text.

BUG: 10260603
Change-Id: I3463b4aa0039442159144e66922d67f5dfee58ed
aptioningManager.java
083199efed839274619eb7a003a7d7c9229e5ffc 30-Aug-2013 Alan Viverette <alanv@google.com> Merge "Update captioning APIs" into klp-dev
69ce69b0e1500bcf0bfa87eaf0b89ae47f552f5c 29-Aug-2013 Alan Viverette <alanv@google.com> Update captioning APIs

CaptioningManager is now a first-class service in Context and can
have listeners added to it to monitor changes.

BUG: 10260603, 10461210
Change-Id: I2df5b2997537bb343d902b7ace3343ad483f3717
aptioningManager.java
cb8ed39b3fb591be60b9fb1799d4ea4530eab758 24-Aug-2013 Svetoslav Ganov <svetoslavganov@google.com> Update AccessibilityNodeInfo API as per API council request

bug:10461302

Change-Id: I9709a271ab3720e064b98c79c0950d811fe37b73
ccessibilityNodeInfo.java
df39cb9b05a223f24b43c783574abbe67d643fdb 19-Aug-2013 Alan Viverette <alanv@google.com> Remove duplicate sealed node checks, add missing checks

Change-Id: Icbe79ba4b74776f845b43f261624d0dbeda4250b
ccessibilityNodeInfo.java
43a1e3d319d77c251445339bcc8f82c82b097fee 03-Aug-2013 Alan Viverette <alanv@google.com> Move caption style to its own class, add presets

BUG: 9926077
Change-Id: I14e809c5a95103e57d30f4273399e9914af52b56
aptioningManager.java
aptioningPreferences.java
ef79380d2f57f87c1f6859a6ec6ceb40bcb794ff 23-Jul-2013 Alan Viverette <alanv@google.com> Add secure settings for captions

BUG: 9926077
Change-Id: I202aef88943e1f884e5bd4c112f081b8b4b76ada
aptioningPreferences.java
8d820ecffdc853aab88cc85bb45bfe72dd2ad893 16-Jul-2013 Svetoslav <svetoslavganov@google.com> Fixing bugs discovered by the CTS tests.

1. Delayed accessibility events sent when a view subtree changes may be
be delivered after accessibility is disabled leading to a crash. It is
possible that accessibility was disabled while we were waiting for
the timeout before sending the event. Added a check before dispatching.

2. When refreshing a cached node the accessibility node info cache was
not using the correct bypass cache argument value and as result was
not getting the latest node but its cached value. We really want to
get the latest state to update the cache.

3. The debugging cache integrity verification logic was incorrectly
removing nodes from the cache while doing its work.

4. Removed the comments for some debug logging.

bug:9857067

Change-Id: I20ee1a6ffa65ad35457b51d3f2dc0bc5d8d784e6
ccessibilityNodeInfoCache.java
3fcf1eda18f6c6ce2bf8f9ba7c09ca973b917009 18-Jun-2013 Svetoslav <svetoslavganov@google.com> Update Javadoc references

Change-Id: I2e4834070de6ebd55e6350f31f9f8e619cb0ff2d
ccessibilityNodeInfo.java
3577a283e1af3e14fe980c4fec55781a58cd8e3c 06-Jun-2013 Svetoslav <svetoslavganov@google.com> Adding traits APIs to AccessibilityNodeInfo.

This change adds several traits and properties to AccessibilityNodeInfo
aiming to allow better description of native Android components to
accessibility services as well as mapping web content to native Android
node info tree.

Change-Id: I36b893cbaa6213c9d02d805e9dc36b6d792b4961
ccessibilityNodeInfo.java
6254f4806dd3db53b7380e77fbb183065685573e 05-Jun-2013 Svetoslav <svetoslavganov@google.com> Optimizing AccessibilityNodeInfo caching.

1. Before we were firing an accessibility event from the common
predecessor of views with accessibility related state changes
every X amount of time. These events designate that the tree
rooted at the source is invalid and should not be cached.
However, some of the state changes do not affect the view tree
structure and we can just refresh the node instead of evicting
and recaching nodes infos for views that did not change. Hence,
we need a way to distinguish between a subtree changed over a
node changed.

Adding a new event type will not work since if say two siblings
have local changes and their predecessor fires a window state
change event, the client will drop the subtree rooted at the
parent including the two views with changes. Subsequent, more
specialized events emitted from the two changed siblings will
be useless since the parent which did not changed is already
evicted from the cache. Conversely, if the specialized events
are fired from the two siblings with local changes and they
are refreshed in the cache the subsequent window state change
event from the common predecessor will force the refreshed
nodes to be evicted.

Hence, to enable distinction between node being changed and
a subtree baing changed while not changing existing behavior,
we will fire only window content change event with an additional
argument specifying what changed - node or a subtree for now.
Also if the changes are local to a view we fire the window
content changed event from the view. So, the two siblings will
fire such an event independently and the client will know that
these are local changes and can just refresh the node. If the
changes are structural, then we fire the window state change
event from the common predecessor.

2. Added the input type of a text view as one of the properties
reported by an AccessibilityNodeInfo. It is nice to prompt the
user what input is expected.

3. Added a bundle for optional information to AccessiiblityNodeInfo.
For example, it will be used for putting web specific properties
that do not map cleanly to Android specific ones in WebView.

4. AccessibilityInteractionController was not taking into account
whether the current accessibility focused node is shown before
returing it. Hence, a disconnected node would be returned and
caching it puts our cahche in an inconsistent state.

Change-Id: I8ed19cfb4a70bdd7597c3f105487f1651cffd9e0
ccessibilityEvent.java
ccessibilityInteractionClient.java
ccessibilityNodeInfo.java
ccessibilityNodeInfoCache.java
ccessibilityRecord.java
06ccc77f4849f9f9fc6ef33cd5ef6cfd00898d00 14-May-2013 Svetoslav <svetoslavganov@google.com> am 80127981: am c0a979ce: Merge "Fixing the accessibility text traversal in extend mode." into jb-mr2-dev

* commit '80127981f85a0be842007596830c1675a9a3665e':
Fixing the accessibility text traversal in extend mode.
abad55d860be793b8b9b3e288a74214da89fb368 08-May-2013 Svetoslav <svetoslavganov@google.com> Fixing the accessibility text traversal in extend mode.

We added APIs to allow an accessibility service to extend the
selection while moving the cursor at a given granularity such
as word, character, etc. The problem is that the traversal was
extending only the end of the selection while moving forward
and the start of the selection while moving backward. This leads
to a case in which the user cannot shrink/extend the selection
because for example instead of shrinking the end of the selection
the implementation was extending the start.

Now extending the selection moves only the selection end. This is
the same behavior as text view using a keyboard.

Tests: https://googleplex-android-review.googlesource.com/#/c/307062

bug:8839844

Change-Id: Id6965b102647df909f61301fcc8ec05458dd5881
ccessibilityEvent.java
fb2563103b4f377867c5fa556217987903f73052 24-Apr-2013 Svetoslav <svetoslavganov@google.com> am 939ff0ac: am 4c783066: Merge "Fixing bugs exposed when moving accessibility CTS tests to UiAutomation." into jb-mr2-dev

* commit '939ff0acff8a21a023d79214130680a66214840f':
Fixing bugs exposed when moving accessibility CTS tests to UiAutomation.
db7da0eb8b7d515c168d5b410764e24c9a0f9431 23-Apr-2013 Svetoslav <svetoslavganov@google.com> Fixing bugs exposed when moving accessibility CTS tests to UiAutomation.

1. UiAutomation#executeAndWaitForEvent method was invoking the passed
runnable while holding the lock which may lead to a deadlock. For
example: a runnable that calls getActivity() gets us into a state
like this.

2. UI automation services did not get all capabilities such a
service can have. Now a UI test service gets all of them.

3. When UiAutomation was exiting for event fired as a result of a
performed action, it was checking whether the received evnet time
is strictly before the time of executing the command that should
fire the event. However, if the execution is fast enough, i.e.
less than one millisecond, then the event time and the execution
time are the same. This was leading to a missed signal in rare
cases.

4. AccessibilityNodeInfoCache was not clearing the relevant state
for accessibility focus clearing event.

5. Accessibility text traversal in TextView was partially using text
and partially content description - broken. Now we are using the
text since for text view and content desc for other views. In other
words, we are using the most precise text we have.

6. AccessibilityManagerService was not granting capabilities of a
UiAutomation service - plainly wrong.

CTS change:https://googleplex-android-review.googlesource.com/#/c/300693/

bug:8695422
bug:8657560

Change-Id: I9afc5c3c69eb51f1c01930959232f44681b15e86
ccessibilityNodeInfoCache.java
7ac47e8acba4d352ac2971d46589c03dad45436a 23-Apr-2013 Svetoslav <svetoslavganov@google.com> am 7bf02d12: am a61464d7: Merge "Making new node id APIs return strings." into jb-mr2-dev

* commit '7bf02d1255e86becb225ba70ca3ea8b2af90c166':
Making new node id APIs return strings.
9fa1ee563b5a9ca25554f1fa59d1222dcfdfc623 22-Apr-2013 Svetoslav <svetoslavganov@google.com> Making new node id APIs return strings.

The node id does not have to be decorated with spans like spannable
so it makes no sense to have these APIs use anything else but string.

bug:8657338

Change-Id: I2e7c31128ee9f2933bd0d58beac4ba31a498bb09
ccessibilityNodeInfo.java
6b25e726cbe704a25a179ba62c6430dc6f974c67 01-Mar-2013 Svetoslav <svetoslavganov@google.com> Remove a workaround for accessibility managers that works across users.

The system and some processes such as the keyguard and system UI
run across users. Hence, the local accessibility manager should call
into the backing system service with the id of the current user.
For all other processes the local manager uses the current user id.
There was a method that is to be called before the local accessibility
manager has been accessed to initialize it to work across users.
This had to be done for keyguard and system UI.

This change removed the workaround and now the local accessibility
manager determines under the hood which user id to use while calling
into the system. If the local manager is in the system process or
its process has permissions to work across uses, the manager uses
UserHandle.USER_CURRENT, otherwise it uses the user if its process.

Change-Id: I3e97fe98805adca01c1a0127a276828e90926f95
ccessibilityManager.java
3c55e5c6595d28c64f5a760947c66fdefa2481e2 28-Feb-2013 Svetoslav <svetoslavganov@google.com> Fake accessibility service used by UiAutomation not destroyed.

UiAutomation registers a fake accessibility service to introspect
the screen. Upon the death of the shell process that started an
instrumentation in which a UiAutomation resides the connection
between the UiAutomation and the system is kept alive allowing
the instrumentation to introspect the screen even after the death
of the shell process.

bug:8285905

Change-Id: I1a16d78abbea032116c4baed175cfc0d5dedbf0c
AccessibilityManager.aidl
bcc46a0d037e62fcb5e5f0f5e1acef5a8c1314b0 06-Feb-2013 Svetoslav <svetoslavganov@google.com> Set accessibility cursor in non-text views with content description.

We support text traversal at a granularity over non-next views with
content description, hence we should support setting the cursor position
in such views.

bug:8134469

Change-Id: I4dba225b0ade795b7a20c201fb906ae7146c065d
ccessibilityNodeInfo.java
92826459d101d2d76b2d75347232b1fee08962cf 05-Feb-2013 Svetoslav <svetoslavganov@google.com> Fix a javaDoc error

Change-Id: Ia23660f102455aefad80cb75a8bbd8fc0d4455c3
ccessibilityNodeInfo.java
22431a3b6fb5ae3498c6ae780648ca0228635eba 05-Feb-2013 Svetoslav <svetoslavganov@google.com> Rename a member variable

Change-Id: I1f7a3b8119d84a1119637f79fcd3c29f8b79ef27
ccessibilityNodeInfo.java
eecedffe4286321c3a4e58ef66a536420cd1f239 05-Feb-2013 Svetoslav <svetoslavganov@google.com> Renaming some APIs

Change-Id: I9e226d39648796f95dd0e86ffecbb3f93544243b
ccessibilityNodeInfo.java
242724ee524573b42cad3812c633295607f9c6e1 01-Feb-2013 Svetoslav Ganov <svetoslavganov@google.com> Add to string implementation for the new accessibility actions.

bug:8122974

Change-Id: I3d0907af37a6622ab867317e67c773a8aeb16abf
ccessibilityNodeInfo.java
7c51284d8019ed04ab296be84839d8a90ac042fa 31-Jan-2013 Svetoslav <svetoslavganov@google.com> Add accessibility actions for text editing.

Currently text editing is pretty hard (certain operations even
impossible) for a blind person. To address the issue this change
adds APIs that enable an accessibility service to perform basic
text editing operations such as copy, paste, cut, set selection,
extend selection while moving at a given granularity.

The new APIs enable an accessibility service to expose a gesture
driven efficient text editing facility.

bug:8098384

Change-Id: I82b200138a3fdf4c0c316b774fc08a096ced29d0
ccessibilityNodeInfo.java
14ff996ce82734100ba3faedbc80c4783eebea9d 29-Jan-2013 Svetoslav <svetoslavganov@google.com> Update JavaDoc

Change-Id: I9644677eb715de1c4ba2f1608b38980f02bdf75d
ccessibilityNodeInfo.java
80943d8daa6ab31ab5c486d57aea406aa0730d58 02-Jan-2013 Svetoslav Ganov <svetoslavganov@google.com> Adding UI test automation APIs.

This change adds APIs support for implementing UI tests. Such tests do
not rely on internal application structure and can span across application
boundaries. UI automation APIs are encapsulated in the UiAutomation object
that is provided by an Instrumentation object. It is initialized by the
system and can be used for both introspecting the screen and performing
interactions simulating a user. UI test are normal instrumentation tests
and are executed on the device.

UiAutomation uses the accessibility APIs to introspect the screen and
a special delegate object to perform privileged operations such as
injecting input events. Since instrumentation tests are invoked by a shell
command, the shell program launching the tests creates a delegate object and
passes it as an argument to started instrumentation. This delegate
allows the APK that runs the tests to access some privileged operations
protected by a signature level permissions which are explicitly granted
to the shell user.

The UiAutomation object also supports running tests in the legacy way
where the tests are run as a Java shell program. This enables existing
UiAutomator tests to keep working while the new ones should be implemented
using the new APIs. The UiAutomation object exposes lower level APIs which
allow simulation of arbitrary user interactions and writing complete UI test
cases. Clients, such as UiAutomator, are encouraged to implement higher-
level APIs which minimize development effort and can be used as a helper
library by the test developer.

The benefit of this change is decoupling UiAutomator from the system
since the former was calling hidden APIs which required that it is
bundled in the system image. This prevented UiAutomator from being
evolved separately from the system. Also UiAutomator was creating
additional API surface in the system image. Another benefit of the new
design is that now test cases have access to a context and can use
public platform APIs in addition to the UiAutomator ones. Further,
third-parties can develop their own higher level test APIs on top
of the lower level ones exposes by UiAutomation.

bug:8028258

Also this change adds the fully qualified resource name of the view's
id in the emitted AccessibilityNodeInfo if a special flag is set while
configuring the accessibility service. Also added is API for looking
up node infos by this id. The id resource name is relatively more stable
compared to the generaed id number which may change from one build to
another. This API facilitate reuing the already defined ids for UI
automation.

bug:7678973

Change-Id: I589ad14790320dec8a33095953926c2a2dd0228b
ccessibilityInteractionClient.java
ccessibilityNodeInfo.java
AccessibilityInteractionConnection.aidl
0b0afb49a85c54b6e876055e76dc41d4345948a4 04-Dec-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding API for refreshing the state of an AccessibilityNodeInfo.

Sometimes a client needs to hold onto an accessibility node info and
this info may get into a stale state. The clent has to be able to
request a refresh of the info. This change adds a refresh call to
AccessibilityNodeInfo.

bug:6711796

Change-Id: I580a9a5d9fd1f705ea0a2cf4d3ff65543714c9c3
ccessibilityNodeInfo.java
152e9bb81aa5b2ab4637f4b2dae04b3ce89fa891 13-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Refactoring of the screen magnification feature.

1. The screen magnification feature was implemented entirely as a part of the accessibility
manager. To achieve that the window manager had to implement a bunch of hooks for an
external client to observe its internal state. This was problematic since it dilutes
the window manager interface and allows code that is deeply coupled with the window
manager to reside outside of it. Also the observer callbacks were IPCs which cannot
be called with the window manager's lock held. To avoid that the window manager had
to post messages requesting notification of interested parties which makes the code
consuming the callbacks to run asynchronously of the window manager. This causes timing
issues and adds unnecessary complexity.

Now the magnification logic is split in two halves. The first half that is responsible
to track the magnified portion of the screen and serve as a policy which windows can be
magnified and it is a part of the window manager. This part exposes higher level APIs
allowing interested parties with the right permissions to control the magnification
of a given display. The APIs also allow a client to be registered for callbacks on
interesting changes such as resize of the magnified region, etc. This part servers
as a mediator between magnification controllers and the window manager.

The second half is a controller that is responsible to drive the magnification
state based on touch interactions. It also presents a highlight when magnified to
suggest the magnified potion of the screen. The controller is responsible for auto
zooming out in case the user context changes - rotation, new actitivity. The controller
also auto pans if a dialog appears and it does not interesect the magnified frame.

bug:7410464

2. By design screen magnification and touch exploration work separately and together. If
magnification is enabled the user sees a larger version of the widgets and a sub section
of the screen content. Accessibility services use the introspection APIs to "see" what
is on the screen so they can speak it, navigate to the next item in response to a
gesture, etc. Hence, the information returned to accessibility services has to reflect
what a sighted user would see on the screen. Therefore, if the screen is magnified
we need to adjust the bounds and position of the infos describing views in a magnified
window such that the info bounds are equivalent to what the user sees.

To improve performance we keep accessibility node info caches in the client process.
However, when magnification state changes we have to clear these caches since the
bounds of the cached infos no longer reflect the screen content which just got smaller
or larger.

This patch propagates not only the window scale as before but also the X/Y pan and the
bounds of the magnified portion of the screen to the introspected app. This information
is used to adjust the bounds of the node infos coming from this window such that the
reported bounds are the same as the user sees not as the app thinks they are. Note that
if magnification is enabled we zoom the content and pan it along the X and Y axis. Also
recomputed is the isVisibleToUser property of the reported info since in a magnified
state the user sees a subset of the window content and the views not in the magnified
viewport should be reported as not visible to the user.

bug:7344059

Change-Id: I6f7832c7a6a65c5368b390eb1f1518d0c7afd7d2
ccessibilityInteractionClient.java
AccessibilityInteractionConnection.aidl
f4782ec9c57a40224ac0974fce6b6fe280c829ce 28-Nov-2012 Svetoslav Ganov <svetoslavganov@google.com> Switching the accessibility poolable classes to the new pool management APIs.

The pool management APIs were simplified and using them requires much less
code than implementing your own pooling. Using common pooling logic is
also less error prone. This change swithces AccessibilityEvent and
AccessibilityNodeInfo to the new APIs.

Change-Id: I2dcfe2e1b0b0be5f89bd92359766ae3d6f8a143b
ccessibilityEvent.java
ccessibilityNodeInfo.java
6ce77cdd6aff7193c746cd1eb87d5babf9158bac 22-Nov-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding dump support for the accessibility manager service.

Change-Id: Ibc8d9eac3be065f1a753e1401568b8f93263b051
ccessibilityEvent.java
fc9c4cd51b3bdca27726dd6d8a00d47e388ca2aa 02-Nov-2012 Svetoslav Ganov <svetoslavganov@google.com> Polish user selector accessibility.

1. The current user was not announced as such.

2. The event for a user switch was not sent.

Change-Id: Ib3caf1f9e93ea1f0b5450246601bc37f416be6da
ccessibilityRecord.java
7befb7deb2ac15134b3bb190520cba19165d16dd 28-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Global gesture to toggle Accessibility system-wide.

1. This change adds a global gesture for enabling accessibility.
To enable this gesture the user has to allow it from the
accessibility settings or use the setup wizard to enable
accessibility. When the global gesture is enabled the user
can long press on power to bring the global actions dialog
and then hold with two fingers for a few seconds to enable
accessibility. The appropriate feedback is also provided.

2. The global gesture is writing directly into the settings for
the current user if performed when the keyguard is not on. If
the keygaurd is on and the current user has no accessibility
enabled, the gesture will temporary enable accessibility
for the current user, i.e. no settings are changed, to allow
the blind user to log into his account. As soon as a user
switch happens the new user settings are inherited. If no
user change happens after temporary enabling accessibility
the temporary changes will be undone when the keyguard goes
away and the device will works as expected by the current user.

bug:6171929

3. The initialization code for the owner was not executed due
to a redundant check, thus putting the accessibility layer in
an inconsistent state which breaks pretty much everything.

bug:7240414

Change-Id: Ie7d7aba80f5867b7f88d5893b848b53fb02a7537
AccessibilityManager.aidl
58d37b55bd228032355360ea3303e46a804e0516 18-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Multi-user support for the accessibility layer.

1. This change converts the accessibility manager service to
maintain a state per user. When the user changes the services
for the user that is going away are disconnected, the local
accessibility managers in the processes for this user are
disabled, the state is swapped with the new user's one, and
the new user state is refreshed.

This change updates all calls into the system to use their
user specific versions when applicable. For example, regisetring
content observers, package monitors, calls into other system
services, etc.

There are some components that are shared across users such
as UI created by the system process and the SystemUI package.
Such components are managed as a global state shared across
all users and are updated accordingly on a user switch. Since
the SystemUI is running in a normal app process this change
adds hidden APIs on the local window manager to allow the
SystemUI to notify the accessibility layer that it will run
accross users.

Calls to AccessibiltyManager's isEnabled(), isTouchExplorationEnabled()
and sendAccessibilityEvent return false or a are a nop for a
background user sice he should not send accessibility events,
and should not perform touch exploration.

Update the internal accessibility tests due to changes in the
AccessibilityManager.

This change also fixes several issues that were encountered
such as calling out the accessibility manager service with a
lock held.

Removed some incorrect debugging code from the TouchExplorer
that was leading to a system crash.

bug:6967373

Change-Id: I2cf32ffdee1d827a8197ae4ce717dc0ff798b259
ccessibilityManager.java
AccessibilityManager.aidl
77276b60851a158ad3e142cb3b091d57ae5ceffb 14-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding accessibility events for touch and gesture detection states.

1. Currently the system fires accessibility events to announce the
start and end of a touch exploration gesture. However, such a
gesture starts after we have decided that the user is not
performing a gesture which is achieved by measuring speed of
movement during a threshold distance. This allows an accessibility
service to provide some feedback to the user so he knows that
he is touch exploring.

This change adds event types for the first and last touches
of the user. Note that the first touch does not conincide with
the start of a touch exploration gesture since we need a time
or distance to pass before we know whether the user explores
or gestures. However, it is very useful for an accessibility
service to know when the user starts to interact with the
touch screen so it can turn the speech off, to name one
compelling use case.

This change also provides event types for the start and end
of gesture detection. If the user has moved over the threshold
with a speed greater than X, then the system detects gestures.
It is useful for an accessibility service to know the begin
and end of gesture detection so it can provide given feedback
type for such a gesture, say it may produce haptic feedback
or sound that differs for the one for touch exploration.

The main benefit of announcing these new events is that an
accessibility service can provide feedback for each touch
state allowing the user to always know what he is doing.

bug:7166935

Change-Id: I26270d774cc059cb921d6a4254bc0aab0530c1dd
ccessibilityEvent.java
33aef98fd28dcac0a2ad37e7329afd3e666f5e0a 13-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Allowing association between a view and its label for accessibility.

1. For accessibility purposes it is important to be able to associate
a view with content with a view that labels it. For example, if
an accessibility service knows that a TextView is associated with
an EditText, it can provide much richer feedback.

This change adds APIs for setting a view to be the label for another
one and setting the label for a view, i.e. the reverse association.

bug:5016937

Change-Id: I7b837265c5ed9302e3ce352396dc6e88413038b5
ccessibilityNodeInfo.java
c9c9a48e7bafae63cb35a9aa69255e80aba83988 16-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Removing a workaround for incorrect window position on window move.

1. The window manager was not notifying a window when the latter
has been moved. This was causing incorrect coordinates of the
nodes reported to accessibility services. To workaround that
we have carried the correct window location when making a
call from the accessibility layer into a window. Now the
window manager notifies the window when it is moved and the
workaround is no longer needed. This change takes it out.

2. The left and right in the attach info were not updated properly
after a report that the window has moved.

3. The accessibility manager service was calling directly methods
on the window manager service without going through the interface
of the latter. This leads to unnecessary coupling and in the
long rung increases system complexity and reduces maintability.

bug:6623031

Change-Id: Iacb734b1bf337a47fad02c827ece45bb2f53a79d
ccessibilityNodeInfo.java
AccessibilityInteractionConnection.aidl
27e2da7c171afa39358bbead18fbe3e6b8ea6637 03-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Remove the accessibility focus search code.

1. In JellyBean we have added some APIs to search for next accessibility
focus in various directions and set accessibility focus from hover.
However, we have decided that there is not clean answer for how this
should behave and the APIs were hidden. Now the accessibility service
is responsible for that. The unused code is now taken out.

2. This patch also takes out the hidden attribute accessibiligyFocusable
since we moved the responsibility for implementing focus search strategy
to accessibility services and we did not need that for Jellybean which
is a good sign that this is not needed. I general this is one less thing
for an app developer to worry about. We can add this if needed later.

bug:6773816

Change-Id: I0c858d72c93a2b7ff1f8f35a08d33ec4b9eb85fd
ccessibilityNodeInfo.java
ccessibilityNodeProvider.java
45a02e0809c14a52aa24658666df0d41ce661857 18-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> API for finding accessibility focus in virtual tree not needed.

1. The function for finding where the accessibility focus in a virtual
node tree presented by an AccessibilityNodeProvider is not needed
API since the framework already keeps track of the accessibility
focused virtual node in order to draw the focus rectangle. This API
adds unnecessary complexity to developers of AccessibilityNodeProviders.

bug:6675330

Change-Id: I84774686b06a995073a39e45b8ef22f2cd04b773
ccessibilityNodeProvider.java
8ffe8b304e4778b3c95e57ad5a77cd41c9cf9f7b 15-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility focus search and setting it from hover are performed by the client.

1. Currently we are providing accessibility focus search algorithm in the
framework and we are also setting accessibility focus from hover. It
appears that implementing a focus search strategy that works for all
accessibility services is non trivial task if feasible. Based on
feedback from the developers of two such services at Google - TalkBack
and BarilleBack - the built in focus search does not quite match what
they need and they would like to implement a custom strategy.

Hence, having APIs for accessibility focus search in the framework does
not make. Therefore, we are hiding this APIs and later will take out the focus
search logic and allow the accessibility service to implement search.

Also putting accessibility focus from hover is tightly integrated with
the focus search since the set of views that get accessibility focus
from hover should be the same as the set of views returned by the
focus search routine. Therefore, we are letting the accessibility service
decide where to put accessibility focus when it gets an accessibility
hover event.

bug:6675330

Change-Id: Ie152230990a6602f3fd1d82de2177d0b1444d654
ccessibilityNodeInfo.java
ccessibilityNodeProvider.java
ee33ad24cdc31ed0d7f99e110e041b0a63c9b0f1 09-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> Settings crash after enabling TalkBack accessibility.

1. AccessibilityInput filter was not checking whether the touch
explorer instance is not null before passing it an accessibility
event. If the accessibility event is dispatched before the input
filter is installed but after it is created we runt into this
case.

2. Added a missing null check in accessibility node info.

bug:6635089

Change-Id: Ia389dc1f427427eb73794f6331ccb870e0b44c55
ccessibilityNodeInfo.java
86783474fdec98a22bc22e224462767eab13e273 07-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> Cannot interact with dialogs when IME is up and on not touch explored popups.

1. If the last touch explored location is within the active window we
used to click on exact location if it is within the accessibility
focus otherwise in the accessibility focus center. If the last touch
explored location is not within the active window we used to just
click there. This breaks in the case were one has touch explored
at a given place in the current window and now a dialog opens *not*
covering the touch explored location. If one uses swipes to move
accessibility focus i.e. to traverse the dialog without touching
it one cannot activate anything because the touch explorer is using
the last touch explored location that is outside of the active
window e.g the dialog.

The solution is to clear the last touch explored location when a
window opens or accessibility focus moves. If the last touch
explored location is null we are clicking in the accessibility
focus location.

bug:6620911

2. There is a bug in the window manager that does not notify a
window that its location has changed (bug:6623031). This breaks
accessibility interaction with dialogs that have input because
when the IME is up the dialog is moved but not notified. Now
the accessibility layer gets incorrect location for the
accessibility focus and the window bounds.

The soluion is when the accessibility manager service calls
into the remove thress to obtain some accessibility node infos
it passes the window left and top which it gets from the
window manager. These values are used to update the attach info
window left and top so all accessibility node infos emitted
from that window had correct bounds in screen coordinates.

bug:6620796

Change-Id: I18914f2095c55cfc826acf5277bd94b776bda0c8
ccessibilityNodeInfo.java
AccessibilityInteractionConnection.aidl
2ef6905003c20010032ee993dfcc5899ad9be6f8 04-Jun-2012 Svetoslav Ganov <svetoslavganov@google.com> Client app crashes if accessibility service uses invalid focus type.

1. If an accessibility service uses an invalid focus type argument
when trying to find where focus is the queried application crashes.
The same happens if the serivce calls focus search with an invalid
derection. While we need the argument check in the controller that
runs in the app process the accessibility service has to be the
palace where an exception is thown for the invalid argument so
the developer can fix his code.:

bug:6508797

Change-Id: Ib0d74f374fa60ee8fd6117f11c23af34f6c26ad3
ccessibilityNodeInfo.java
4528b4e882584745f48263fa6626987e63832a2a 16-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Prefetching of accessibility node infos getting incorrect views.

1. The prefetcher of accessibility nodes infos was not folloing
the childForAccessibility relationship when finding the views
whose node infos to prefetch.

2. NumberPicker was not reporting the correct parent.

bug:6471710

Change-Id: Ia7ad5dd031fb4b3816dfe630d5212201cfafa236
ccessibilityInteractionClient.java
ccessibilityNodeInfoCache.java
c406be9036643ebe41bafcd94fe4aa861b4e4f4f 12-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Fix inconsitency in aAccessibilityNodeInfo cache.

1. Fixed errors in the accessibility node cache.

A. The cache was not catching the case when the current window changes as a
result the user touch exploring it. As a result the cache had nodes from
more that one window but the node ids are not unique thus causing a mess.

B. The node info tree was prefetched regardless if a prefetched node is root
name space (i.e. view ids - not accessibility ids - are namespaced) while
the prefetched nodes were taking this into account. As a result there can
get disconnected subtrees in the cache.

C. When an event for a property change such as focus was received the cache
we were removing the source node. As a result there may be disconnected nodes.

D. When a node was added to the cache and an older version exists there was
no check if it will point to the same children and parent. As a result if
the state of the node has fewer children the subtrees rooted at the no
longer present children will stay disconnected in the cache.

E. When a node got accessibility or input focus the old one in the cache was
not removed. As a result you may have a state with more than one access
or input focus.

2. Added integrity check enabled only on user builds when a specific flag is set
for the cache which checks whether:

A. All nodes are from the same window.

B. All nodes are connected.

C. There are no duplicates.

D. There is only one input focus.

E. There is only one accessibility focus.

3. The reported accessibility node info tree was stopping at the root namespace
boundary which is not correct. The reported tree has to reflect everything
on the screen that the user can see such a workspace with widgets. The root
namespace is added to avoid clash of view id but the accessibility ids are
unique no matter if the view is inflated from a remote view.

4. Added calls to notify the accessibility layer when a preoprty that is interesting
for accessibiliy has changed.

bug:6471710

Change-Id: I069470d91f209ba16313fa6539787a55efa3512e
ccessibilityInteractionClient.java
ccessibilityNodeInfoCache.java
a1dc761c8322355eb1bb71d3d6c9c603c1d1fc0f 10-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding scroll actions to accessibility node info.

1. Scrolling actions are crucial for enabling a gesture based
traversal of the UI and specifically scrollable containers
especially lists and anything backed by an adapter. Since
accessibility focus can land only attached views, it cannot
visit views for adapter items not shown on the screen.
Auto scrolling the list as a result of putting access focus
ot a list item does not work well since the user may get
trapped in a long list. Adding an accessibility node provider
to emit virtual views for one view before the first and one
after the last is complex and suffers the limitation of trapping
the user. Accessibility service need an explicit scroll actions
which may be performed upon an explicit user action. Hence,
the user is informed for the start/end of the visible part of
the list and he makes a deliberate choice to scroll. This will
benefit also people developing Braille devices since they can
scroll the content without telling the user to stop using the
Braille controller and take the device out of his pocket to scroll
and go back to the Braille controller.

NOTE: Without these action large portions of the screen will be
hard to access since users will have to touch and explore to
find and scroll the list.

Change-Id: Iafcf54d4967893205872b3649025a4e347a299ed
ccessibilityNodeInfo.java
57aab755441a28c2e5c78c35a57b940afc2799e0 10-May-2012 alanv <alanv@google.com> Fixed typo in findAccessibilityFocus API.

Change-Id: I3ca1448792a1b712f781c1bfa73823ca08ea3d39
ccessibilityNodeProvider.java
6704c233390743890d23338a2329dcda5709b810 08-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "AccessibilityNodeInfo for visible views should reported." into jb-dev
0a1bb6dffc358c01e10555c5c833edb7dba69659 07-May-2012 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityNodeInfo for visible views should reported.

1. AccessibilityNodeInfos for visible views should always
be reported and the clients should be able to check
whether that node info is shown to the user. For example,
focus search may return a node that is not on the screen
and the accessibility layer may decide to give it focus
which scroll the source view in the screen.

bug:6421991

Change-Id: Idc1fd8512dda767abe802aacedb0c69582e6fc2a
ccessibilityNodeInfo.java
6d17a936f73976971135aa1e6248662533343292 28-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Text traversal at various granularities.

1. Implementing text content navigation at various granularities.
For views that have content description but no text the
content description is the traversed at character and word
granularities. For views that inherit from TextView the
supported granularities are character, word, line, and page.

bug:5932640

Conflicts:

core/java/android/view/View.java

Conflicts:

core/java/android/view/View.java

Change-Id: I66d1e16ce9ac5d6b49f036b17c087b2a7075e4c0
ccessibilityEvent.java
ccessibilityNodeInfo.java
2b435aada3d274a9c08d334946fff1ab9ba15b48 05-May-2012 Svetoslav Ganov <svetoslavganov@google.com> API REVIEW: android.view.accessibility

1. Changed all references to granularity to movement
granularity. BTW, to be more precise it should be
text movement granularity.

bug:6435232

Change-Id: If6366b002ca3390f74918995b342baff2cbcfd01
ccessibilityEvent.java
ccessibilityNodeInfo.java
52a623700f9bcba7ef8bfe3ba7ff6160a1bd65e8 02-May-2012 Svetoslav Ganov <svetoslavganov@google.com> Virtual nodes are always important for accessibility.

1. Virtual nodes should be made important since the implementer of
the tree represented by the nodes decides which node to report.
In the case with native widgets we decide in the framework but
in the case of the node provider, the implementer of the latter
makes the call. Hence, if a node in not important the provider
should not report it in the first place. The issue this patch
solves is to allow events from virtual nodes to be propagated
to the accessibility services.

bug:6432588

Change-Id: Ie01f84e9e0ef2280da934b98283962a5db38abc2
ccessibilityRecord.java
e9bda15f87c11a8827ca0ffc865611176805cc0a 01-May-2012 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityNodeInfo.getActionSymbolicName() is missing A11y focus actions.

1. The new actions were not added to this helper method so it was
throwing an InvalidArgumentException.

bug:6421059

Change-Id: I132348a50bb900ee19b95cc92c26ce47609ccb1c
ccessibilityNodeInfo.java
b7ff3255c6d4e12f9d2334e3bbec0a125b7b09dc 25-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding explicit text traversal granularities and actions for web navigation.

1. The granularities for traversing the text content of an accessibility
node info are now predefined constants and custom ones will not be
supported. This is the simplest solution - we can always add namespaced
user defined ones (unlikely).

2. Added actions for traversing web content. These actions can be used by
an accessibility service to transparently drive the JavaScript based
screen reader that is used for handling web content.

3. Added a new accessibility event type for traversing the content of a
view. This event is needed to announce to the user what is the next
element, i.e. the one next to the cursor, after the view's text was
traversed.

bug:5932640
bug:6389591

Change-Id: I144647da55bc4005c64f89865ef333af8359e145
ccessibilityEvent.java
ccessibilityNodeInfo.java
76f287e416ded85734b610f316e38d243d2ddb09 23-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Removing hierarchical accessibility focus directions.

1. The accessibility focus directions are not needed since an
accessibility service just get the root, first child, next
sibling, previous sibling and call execute the action to
give it accessibility focus. Now the accessibility node
info tree is properly ordered taking into account layout
manager directions for both layout manager that we report
and ones that we have determined as not important for
accessibility. Also the position of a node info are ordered
properly based on their coordinates after all transformations
as opposed to child index.

bug:5932640

Change-Id: I994a8297cb1e57c829ecbac73a937c2bcbe0bac7
ccessibilityNodeInfo.java
ccessibilityNodeProvider.java
122b2c32dea573a3efbd0d608a70b7cd169d99dd 21-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing a couple of issues I have introduces in the last patch.

1. Fix waiting for the wrong instance.

2. Fix cloning of accessibility node info.

Change-Id: Icabf0d4bc947602a32fddc6642cc787f2bc766e4
ccessibilityNodeInfo.java
aa780c110922148a6a4ba06734bb2b0bb8c98f93 20-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding support for traversing the content of a node info at granularity.

1. A view that creates an accessibility node info may add to the info
a list of granularity labels. These are granularities by which the
source view can iterate over its content. For example a text view
may support character, word link while a web view may additionally
support buttons, tables, etc. There are actions on accessibility
node info to go to the next/previous at a given granularity which
is passesed as an argument.

2. Added Bundle argument to the APIs for performing accessibility
actions. This is generic and extensible.

bug:5932640

Change-Id: I328cbbb4cddfdee082ab2a8b7ff1bd7477d8d6f9
ccessibilityInteractionClient.java
ccessibilityNodeInfo.java
ccessibilityNodeProvider.java
AccessibilityInteractionConnection.aidl
fefd20e927b7252d63acb7bb1852c5188e3c1b2e 20-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding an opt-in mechanism for gesture detection in AccessibilityService.

1. An accessibility service has to explicitly opt in to be notified
for gestures by the system. There is only one accessibility service
that handles gestures and in case it does not handle a gesture
the system performs default handling. This default handling ensures
that we have gesture navigation even if no accessibility service
would like to participate/customize the interaction model.

bug:5932640

Change-Id: Id8194293bd94097b455e9388b68134a45dc3b8fa
ccessibilityInteractionClient.java
005b83b0c62d3d0538f0d566b08bd457015ec661 17-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding some more gestures and actions for accessibility.

1. Added more gesture for accessibility. After a meeting
with the access-eng team we have decided that the current
set of gestures may be smaller than needed considering
that we will use four gestures for home, back, recents,
and notifications.

2. Adding actions for going back, home, opening the recents,
and opening the notifications.

3. Added preliminary mapping from some of the new gestures
to the new actions.

4. Fixed a bug in the accessibility interaction controller
which was trying to create a handled on the main looper
thread which may be null if the queried UI is in the
system process. Now the context looper of the root view
is used.

5. Fixed a bug of using an incorrect constant.

6. Added a missing locking in a couple of places.

7. Fixed view comparison for accessibilityt since it was
not anisymmetric.

bug:5932640
bug:5605641

Change-Id: Icc983bf4eafefa42b65920b3782ed8a25518e94f
ccessibilityNodeInfo.java
4213804541a8b05cd0587b138a2fd9a3b7fd9350 20-Mar-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility focus - framework

Usefulness: Keep track of the current user location in the screen when
traversing the it. Enabling structural and directional
navigation over all elements on the screen. This enables
blind users that know the application layout to efficiently
locate desired elements as opposed to try touch exploring the
region where the the element should be - very tedious.

Rationale: There are two ways to implement accessibility focus One is
to let accessibility services keep track of it since they
have access to the screen content, and another to let the view
hierarchy keep track of it. While the first approach would
require almost no work on our part it poses several challenges
which make it a sub-optimal choice. Having the accessibility focus
in the accessibility service would require that service to scrape
the window content every time it changes to sync the view tree
state and the accessibility focus location. Pretty much the service
will have to keep an off screen model of the screen content. This
could be quite challenging to get right and would incur performance
cost for the multiple IPCs to repeatedly fetch the screen content.
Further, keeping virtual accessibility focus (i.e. in the service)
would require sync of the input and accessibility focus. This could
be challenging to implement right as well. Also, having an unlimited
number of accessibility services we cannot guarantee that they will
have a proper implementation, if any, to allow users to perform structural
navigation of the screen content. Assuming two accessibility
services implement structural navigation via accessibility focus,
there is not guarantee that they will behave similarly by default,
i.e. provide some standard way to navigate the screen content.
Also feedback from experienced accessibility researchers, specifically
T.V Raman, provides evidence that having virtual accessibility focus
creates many issues and it is very hard to get right.
Therefore, keeping accessibility focus in the system will avoid
keeping an off-screen model in accessibility services, it will always
be in sync with the state of the view hierarchy and the input focus.
Also this will allow having a default behavior for traversing the
screen via this accessibility focus that is consistent in all
accessibility services. We provide accessibility services with APIs to
override this behavior but all of them will perform screen traversal
in a consistent way by default.

Behavior: If accessibility is enabled the accessibility focus is the leading one
and the input follows it. Putting accessibility focus on a view moves
the input focus there. Clearing the accessibility focus of a view, clears
the input focus of this view. If accessibility focus is on a view that
cannot take input focus, then no other view should have input focus.
In accessibility mode we initially give accessibility focus to the topmost
view and no view has input focus. This ensures consistent behavior accross
all apps. Note that accessibility focus can move hierarchically in the
view tree and having it at the root is better than putting it where the
input focus would be - at the first input focusable which could be at
an arbitrary depth in the view tree. By default not all views are reported
for accessibility, only the important ones. A view may be explicitly labeled
as important or not for accessibility, or the system determines which one
is such - default. Important views for accessibility are all views that are
not dumb layout managers used only to arrange their chidren. Since the same
content arrangement can be obtained via different combintation of layout
managers, such managers cannot be used to reliably determine the application
structure. For example, a user should see a list as a list view with several
list items and each list item as a text view and a button as opposed to seeing
all the layout managers used to arrange the list item's content.
By default only important for accessibility views are regared for accessibility
purposes. View not regarded for accessibility neither fire accessibility events,
nor are reported being on the screen. An accessibility service may request the
system to regard all views. If the target SDK of an accessibility services is
less than JellyBean, then all views are regarded for accessibility.
Note that an accessibility service that requires all view to be ragarded for
accessibility may put accessibility focus on any view. Hence, it may implement
any navigational paradigm if desired. Especially considering the fact that
the system is detecting some standard gestures and delegates their processing
to an accessibility service. The default implementation of an accessibility
services performs the defualt navigation.

bug:5932640
bug:5605641

Change-Id: Ieac461d480579d706a847b9325720cb254736ebe
ccessibilityEvent.java
ccessibilityInteractionClient.java
ccessibilityManager.java
ccessibilityNodeInfo.java
ccessibilityNodeInfoCache.java
ccessibilityNodeProvider.java
ccessibilityRecord.java
AccessibilityInteractionConnection.aidl
AccessibilityManager.aidl
110414928ae13674b7ec6b816a45cf70ed521683 03-Apr-2012 Joe Fernandez <joefernandez@google.com> am c1a0e54d: am b459b619: am 945b7cb3: Merge "docs: Accessibility Dev Guide (subsumes Accessibility Best Practices)" into ics-mr1

* commit 'c1a0e54de12aee41163b84a25ea8dfc8b64304dc':
docs: Accessibility Dev Guide (subsumes Accessibility Best Practices)
e1302edd40c5cc264f842e17e3796e0a11d6f045 06-Feb-2012 Joe Fernandez <joefernandez@google.com> docs: Accessibility Dev Guide (subsumes Accessibility Best Practices)

Change-Id: Id7e3f647042d2afd390abe851be1c3b561af33ca
ccessibilityEvent.java
ccessibilityEventSource.java
ccessibilityNodeInfo.java
ccessibilityRecord.java
ackage.html
559c4841a631321efc2284de9187dbaccce50550 10-Mar-2012 Ken Wakasa <kwakasa@google.com> Merge "Fix obvious typos under frameworks/base/core"
51ab90cab1609cf0ddd2dfe5a660f020d823d4d5 09-Mar-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding an announcement type accessibility event and a method on View to announce.

1. The need for sending an accessibility event to announce a context change
which does not cleanly fit into the existing UI transition UI events has
come quite a few time in application development. To avoid retrofitting
accessibility event types that do not semantically match the intent to
just announce a short message this patch is adding specialized event type.
Also a helper method on View is added to sheild developers from knowing
how to construct and send such an event.

bug:5977979

Change-Id: Iaf5f620426f8616be67fbf243a02ad5b606c949b
ccessibilityEvent.java
f76a50ce8fdc6aea22cabc77b2977a1a15a79630 09-Mar-2012 Ken Wakasa <kwakasa@google.com> Fix obvious typos under frameworks/base/core

Change-Id: Ia5fc3db1bb51824e7523885553be926bcc42d736
ccessibilityNodeInfo.java
ccessibilityRecord.java
afd5fab3ab001e90269dfef37d87e69e0e261826 24-Feb-2012 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityNodeInfos node properly cached.

1. AccessibilityNodeInfo were not cloned when cached
and obtained from the cache. This was causing a
problem when the client calls #recycle() as he
should since this results in wiping the data of
the cached node info.

bug:6026952

Change-Id: I5807b09d95ef6f310327192ff91f036adf337e33
ccessibilityNodeInfoCache.java
57c7fd5a43237afc5e8ef31a076e862c0c16c328 24-Feb-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing issues with the AccessibilityNodeInfo cache.

1. Before there were two caches one in the app process that
kept track only the ids of infos that were given to a
querying client and one in the querying client that
holds the infos. This design requires precise sync
between the caches. Doing that is somehow complicated
since the app has cache for each window and it has
to intercept all accessibility events from that window
to manage the cache. Each app has to have a cache for
each querying client. This approach would guarantee that
no infos are fetched twice but due to its stateful nature
and the two caches is tricky to implement and adds
unnecessary complexity. Now there is only one cache in
the client and the apps are stateless. The client is
passing flags to the app that are a clue what nodes to
prefetch. This approach may occasionally fetch a node
twice but it is considerably simpler and stateless
from the app perspective - there is only one cache.
Fetching a node more than once does not cause much
overhead compared to the IPC.

Change-Id: Ia02f6fe4f82cff9a9c2e21f4a36747de0f414c6f
ccessibilityInteractionClient.java
ccessibilityNodeInfo.java
ccessibilityNodeInfoCache.java
ccessibilityRecord.java
AccessibilityInteractionConnection.aidl
0d04e245534cf777dfaf16dce3c51553837c14ff 21-Feb-2012 Svetoslav Ganov <svetoslavganov@google.com> Improving accessibility APIs used for UI automation.

1. UiTestAutomationBridge was accessing the root node in the
active window by tracking the accessibility event stream
and keeping the last active window changing event. Now
the bridge is stateless and the root node is fetched by
passing special window and view id with the request to
the system.

2. AccessibilityNodeInfos that are cached were not finished,
i.e. not sealed, causing exception when trying to access
their children or rpedecessors.

3. AccessibilityManagerService was not properly restoring its
state after the UI automation bridge disconnects from it.
I particular the devices was still in explore by touch mode
event if no services are enabled and the sutomation bridge
is disconnected.

4. ViewRootImpl for the focused window now fires accessibility
events when accessibility is enabled to allow accessibility
services to determine the current user location.

5. Several missing null checks in ViewRootImpl are fixed since
there were scenraios in which a NPE can occur.

6. Update the internal window content querying tests.

7. ViewRootImpl was firing one extra focus event.
bug:6009813
bug:6026952

Change-Id: Ib2e058d64538ecc268f9ef7a8f36ead047868a05
ccessibilityInteractionClient.java
ccessibilityNodeInfo.java
79311c4af8b54d3cd47ab37a120c648bfc990511 18-Jan-2012 Svetoslav Ganov <svetoslavganov@google.com> Speedup the accessibility window querying APIs and clean up.

1. Now when an interrogating client requires an AccessibilibtyNodeInfo
we aggressively prefetch all the predecessors of that node and its
descendants. The number of fetched nodes in one call is limited to
keep the APIs responsive. The prefetched nodes infos are cached in
the client process. The node info cache is invalidated partially or
completely based on the fired accessibility events. For example,
TYPE_WINDOW_STATE_CHANGED event clears the cache while
TYPE_VIEW_FOCUSED removed the focused node from the cache, etc.
Note that the cache is only for the currently active window.
The ViewRootImple also keeps track of only the ids of the node
infos it has sent to each querying process to avoid duplicating
work. Usually only one process will query the screen content
but we support the general case. Also all the caches are
automatically invalidated so not additional bookkeeping is
required. This simple strategy leads to 10X improving the
speed of the querying APIs.

2. The Monkey and UI test automation framework were registering a
raw event listener for accessibility events and hence perform
connection and cache management in similar way to an AccessibilityService.
This is fragile and requires the implementer to know internal framework
stuff. Now the functionality required by the Monkey and the UI automation
is encapsulated in a new UiTestAutomationBridge class. To enable this
was requited some refactoring of AccessibilityService.

3. Removed the *doSomethiong*InActiveWindow methods from the
AccessibilityInteractionClient and the AccessibilityInteractionConnection.
The function of these methods is implemented by the not *InActiveWindow
version while passing appropriate constants.

4. Updated the internal window Querying tests to use the new
UiTestAutomationBridge.

5. If the ViewRootImple was not initialized the querying APIs of
the IAccessibilityInteractionConnection implementation were
returning immediately without calling the callback with null.
This was causing the client side to wait until it times out. Now
the client is notified as soon as the call fails.

6. Added a check to guarantee that Views with AccessibilityNodeProvider
do not have children.

bug:5879530

Change-Id: I3ee43718748fec6e570992c7073c8f6f1fc269b3
ccessibilityInteractionClient.java
ccessibilityNodeInfo.java
ccessibilityRecord.java
AccessibilityInteractionConnection.aidl
AccessibilityManager.aidl
55cdacb9ba22ce0e40918fd54acca7df62637ca6 01-Dec-2011 Svetoslav Ganov <svetoslavganov@google.com> am 0bfdd7c2: am e9f24a43: Merge "Fix memory leaks in the accessibility layer." into ics-mr1

* commit '0bfdd7c2927fb683b89fdd52befe643e8e069e77':
Fix memory leaks in the accessibility layer.
36bcdb535e14a8a2e2c8643fb577569f7a2b6aed 01-Dec-2011 Svetoslav Ganov <svetoslavganov@google.com> Fix memory leaks in the accessibility layer.

The AccessibilityServiceConnection chache should be shared
between all interrogating threads.

bug:5664337

Change-Id: I151041d0b358e87ac47ea5c1c258f90a8b252420
ccessibilityInteractionClient.java
786e54dd13111b6a2f75f4f37dd20353cf613e97 01-Dec-2011 Svetoslav Ganov <svetoslavganov@google.com> Fixing the build

Change-Id: I125956773dd364b14f8d328e625df3c852001dbf
ccessibilityInteractionClient.java
66922db828eab153c15bf3ca0b007313d9376e5e 01-Dec-2011 Svetoslav Ganov <svetoslavganov@google.com> Fixing the build - for real

Change-Id: I9628f2da8876b85f9c8ce94cc876b10e083980f6
ccessibilityInteractionClient.java
8b5a814f6a36045b06bee36f44703503c03714d4 01-Dec-2011 Svetoslav Ganov <svetoslavganov@google.com> Fixing the build

Change-Id: I7b2270843123b252098ca798c03284fb089f1b8a
ccessibilityInteractionClient.java
f3b4f3163b5b4c0a54a2643f07c97c47b14a1eb7 01-Dec-2011 Svetoslav Ganov <svetoslavganov@google.com> resolved conflicts for merge of 26f7a81f to master

Change-Id: I6bf5fd7c0de7945cef84602dbe3a7bbed587700f
d116d7c78a9c53f30a73bf273bd7618312cf3847 22-Nov-2011 Svetoslav Ganov <svetoslavganov@google.com> Fixing memory leaks in the accessiiblity layer.

1. AccessibilityInteractionConnections were removed from the
AccessiiblityManagerService but their DeathRecipents were
not unregistered, thus every removed interaction connection
was essentially leaking. Such connection is registered in
the system for every ViewRootImpl when accessiiblity is
enabled and inregistered when disabled.

2. Every AccessibilityEvent and AccessiilbityEventInfo obtained
from a widnow content querying accessibility service had a
handle to a binder proxy over which to make queries. Hoewever,
holding a proxy to a remote binder prevents the latter from
being garbage collected. Therefore, now the events and infos
have a connection id insteand and the hindden singleton
AccessiiblityInteaction client via which queries are made
has a registry with the connections. This class looks up
the connection given its id before making an IPC. Now the
connection is stored in one place and when an accessibility
service is disconnected the system sets the connection to
null so the binder object in the system process can be GCed.
Note that before this change a bad implemented accessibility
service could cache events or infos causing a leak in the
system process. This should never happen.

3. SparseArray was not clearing the reference to the last moved
element while garbage collecting thus causing a leak.

bug:5664337

Change-Id: Id397f614b026d43bd7b57bb7f8186bca5cdfcff9
ccessibilityEvent.java
ccessibilityInteractionClient.java
ccessibilityNodeInfo.java
ccessibilityRecord.java
AccessibilityManager.aidl
e9dc7c9f031b494c6ebe156de957f0a8f2cd58b0 19-Nov-2011 Svetoslav Ganov <svetoslavganov@google.com> am bdc2912d: am d8a3cabc: Merge "Text selection AccessibilityEvents are missing text." into ics-mr1

* commit 'bdc2912da64e5e6402c73997d637224d905ae825':
Text selection AccessibilityEvents are missing text.
84dd52e394d27b5cdf638132808e2585a9049480 18-Nov-2011 Svetoslav Ganov <svetoslavganov@google.com> Text selection AccessibilityEvents are missing text.

The text selection change event was not added to the text
populating accessibility events in View.

bug:5638709

Change-Id: Ie7e319bc07d7e6c48f178a6c1bd22b1fe32ff515
ccessibilityEvent.java
ec6c89b616f5ae50f26185e14ef0f104f7e3f956 27-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Merge "Minor documentation fixes for the APIs to expose virtual view tree."
af0d984a5850666a374d6f7fc690664d33d57568 27-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> resolved conflicts for merge of b0267e28 to master

Change-Id: Ic65ab83958b2e6bb941fe015b557fd2fd8f80683
c0291bb2eb96e96e0fe06047be929f89aa985ae6 26-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityNodeInfo makes incorrect check before calling into the system.

AccessibilityNodeInfo#getParent is checking whether the source view
accessibility id is specified instead that of the parent.

bug:5505799

Change-Id: I436fd2327def2762b4d307819ba0c23baa9a4e03
ccessibilityNodeInfo.java
71b4e71c67df79f53b582fabb34b96ddbe23fe0f 25-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Minor documentation fixes for the APIs to expose virtual view tree.

Change-Id: I94b74196483fb55ca67e0a50eebab0412c88831c
ccessibilityNodeInfo.java
021078554b902179442a345a9d080a165c3b5139 04-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Adding APIs to enable reporting virtual view hierarchies to accessibility serivces.

Added an interface that is the contract for a client to expose a virtual
view hierarchy to accessibility services. Clients impement this interface
and set it in the View that is the root of the virtual sub-tree. Adding
this finctionality via compostion as opposed to inheritance enables apps
to maintain backwards compatibility by setting the accessibility virtual
hierarchy provider on the View only if the API version is high enough.

bug:5382859

Change-Id: I7e3927b71a5517943c6cb071be2e87fba23132bf
ccessibilityEvent.java
ccessibilityInteractionClient.java
ccessibilityNodeInfo.java
ccessibilityNodeProvider.java
ccessibilityRecord.java
AccessibilityInteractionConnection.aidl
82ced8250f78aff7b96f7c6ae75bcfaf1023d336 17-Oct-2011 Scott Main <smain@google.com> am f755a2e8: Merge "docs: a couple notes for a11y methods in View and cleanup to the A11y service HTML to be semantically correct and thus improve its accessibility :)" into ics-mr0

* commit 'f755a2e8aabfd6b26df4f3f56f0e9cdfb06cc173':
docs: a couple notes for a11y methods in View and cleanup to the A11y service HTML to be semantically correct and thus improve its accessibility :)
b303d8381d734f48c4e1de4f11bf25950b28adf1 13-Oct-2011 Scott Main <smain@google.com> docs: a couple notes for a11y methods in View and cleanup to the
A11y service HTML to be semantically correct and thus improve its accessibility :)

Change-Id: I483a8a441d802b056f68f82e0e782d86a73298ac
ccessibilityManager.java
8b6c7dd2fe1016a8f765f98e8114d5f491f02353 11-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Add AccessibilityRecord#getMaxScrollX and #getMaxScrollY to the pubic API

The methods were hidden for the previoud release since they were added
too close to the SDK final date.

bug:5424373

Change-Id: I812b9809223db75636b04549500f023820b6eb5a
ccessibilityRecord.java
9920f4fdeaa3a4c597f62c3d082becc48ea8a7ab 08-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Accessibility text changed event text not populated.

Added the TYPE_VIEW_TEXT_CHANGED event to the populating events.

bug:5430831

Change-Id: I78e87640ea4279227d89f399ad43e9b88eb4a486
ccessibilityEvent.java
d9ee72fddb8be40e414a831fb80458dc48699613 06-Oct-2011 Svetoslav Ganov <svetoslavganov@google.com> Fixing errors in position information of scrollable views reported for accessibility.

1. ScrollView/HorizontalScroll view were reporting only the scroll X and Y but
failed to convey the max scroll along X and Y so the position can be determined.

2. WebView was not reporting correctly its scroll position for accessibility.

3. Some descendants of AdapterView were reporting incorrect position information.

4. Updated the accessibility docs with some details about the scroll information.

5. Cleaned up duplicated code.

bug:5412132
bug:5412265

Change-Id: I165e73ecde027dad811425b9f395a3f758c923ba
ccessibilityEvent.java
ccessibilityRecord.java
82e236d72ac197d6673d0b4d484fe5f0b9436731 30-Sep-2011 Svetoslav Ganov <svetoslavganov@google.com> The logic for not populating text to some accessibility events is scattered.

1. Some accessibility evenents should not and were not dispatched for
text population but there was no centralized location for enforcing
this - rather the system was firing them in a specific way or there
were conditions in a few places enforcing that. Now this is centralized
and clean.

2. Updated the documentation with some new event types the were lacking.

3. Explicitly stated in the documentaition which events are dispatched to
the sub-tree of the source for text populatation.

bug:5394527

Change-Id: I86e383807d777019ac98b970c7d9d02a2f7afac6
ccessibilityEvent.java
ea515aeafa01de6f50c854ee381b972ef2478284 15-Sep-2011 Svetoslav Ganov <svetoslavganov@google.com> Update the public APIs for finding views by text to optionally use content description.

1. Added flags to the search method to specify whether to match text or
content description or both.

2. Added test case for the seach by content description.

3. Updated the code in AccessibilityManager service to reflect the latest
changes there so test automation service works - this is the fake
service used for UI automation.

Change-Id: I14a6779a920ff0430e78947ea5aaf876c2e66076
ccessibilityNodeInfo.java
6bc5e530016928027c7b390a8368ecdd5bff072f 10-Sep-2011 Svetoslav Ganov <svetoslavganov@google.com> Inter process interrogation ocassionally gets stuck.

1. There was a bug that was not handling correctly the
case for which the interrogator requests an accessibility
node info and the message describing how to fetch the
latter for the same process case was delivered after the
code that checks whether the message is there in order to
dispatch it is executed. Now the message handling is done
correctly - the caller checks if the message is present and
if so processes it, otherwise the caller sleeps and is
interrupted if such a message arrives.

bug:5138933

Change-Id: I4c2940b46c9a52a51c5ee48b83ca6811489765d6
ccessibilityInteractionClient.java
8bd69610aafc6995126965d1d23b771fe02a9084 23-Aug-2011 Svetoslav Ganov <svetoslavganov@google.com> Intra-process view hierarchy interrogation does not work.

The content retrieval APIs are synchronous from a client's
perspective but internally they are asynchronous. The client thread
calls into the system requesting an action and providing a callback
to receive the result after which it waits up to a timeout for that
result. The system enforces security and then delegates the request
to a given view hierarchy where a message is posted (from a binder
thread) describing what to be performed by the main UI thread the
result of which it delivered via the mentioned callback. However,
the blocked client thread and the main UI thread of the target view
hierarchy can be the same one, for example an accessibility service
and an activity run in the same process, thus they are executed on the
same main thread. In such a case the retrieval will fail since the UI
thread that has to process the message describing the work to be done
is blocked waiting for a result is has to compute! To avoid this scenario
when making a call the client also passes its process and thread ids so
the accessed view hierarchy can detect if the client making the request
is running in its main UI thread. In such a case the view hierarchy,
specifically the binder thread performing the IPC to it, does not post a
message to be run on the UI thread but passes it to the singleton
interaction client through which all interactions occur and the latter is
responsible to execute the message before starting to wait for the
asynchronous result delivered via the callback. In this case the expected
result is already received so no waiting is performed.

bug:5138933

Change-Id: I382e2d8689f5189110226613c2387f553df98bd3
ccessibilityInteractionClient.java
ccessibilityNodeInfo.java
ccessibilityRecord.java
AccessibilityInteractionCallback.aidl
AccessibilityInteractionConnection.aidl
AccessibilityInteractionConnectionCallback.aidl
e4aa13b20166219a62916a92294055e7cc5c9f10 01-Aug-2011 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityEvent#toString() always reports -1 for record count.

1. The implementation of toString() was calling a wrong method
for the record count.

bug:5087078

Change-Id: I4ca79faa6ccce135eb6fe797de7b08e30f8b3e71
ccessibilityEvent.java
00aabf7d187bc05408199bd687a538b2e68bdc17 21-Jul-2011 Svetoslav Ganov <svetoslavganov@google.com> Touch exploration state set to clients asynchronously and depended on talking service being enabled.

1. Upon registration of an accessibility client the latter received only
the accessiiblity state and waiting for the touch exploration state
to be sent by the system in async manner. This led the very first
check of touch exploration state is checked a wrong value to be reported.
Now a state of the accessibility layer is returned to the client
upon registration.

2. Removing the dependency on talking accessibility service to be enabled
for getting into touch exploration mode. What if the user wants to use
an accessibility service that shows a dialog with the text of the touched
view?

bug:5051546

Change-Id: Ib377babb3f560929ee73bd3d8b0d277341ba23f7
ccessibilityManager.java
ccessibilityNodeInfo.java
AccessibilityManager.aidl
AccessibilityManagerClient.aidl
35bfedeaba724aeadc6f6c890269cb6bf7ef42f5 15-Jul-2011 Svetoslav Ganov <svetoslavganov@google.com> Touch exploration separate setting and API to poll the latter state.

1. Seperated touch exploration to be a seperate setting rather being
magically enabled by the system of accessiiblity is on the there
is at leas one accessibility service that speaks enabled. Now
there is a setting for requesting touch exploration but still the
system will enabled it only if that makes sense i.e. accessibility
is on and one accessibility service that speaks is enabled.

2. Added public API for checking of touch exploration is enabled.

3. Added description attribute in accessibility service declaration
which will be shown to the user before enabling the service.

4. Added API for quick cloning of AccessibilityNodeInfo.

5. Added clone functionality to SparseArray, SparseIntArray, and
SparseBooleanArray.

bug:5034010
bug:5033928

Change-Id: Ia442edbe55c20309244061cd9d24e0545c01b54f
ccessibilityEvent.java
ccessibilityManager.java
ccessibilityNodeInfo.java
AccessibilityManagerClient.aidl
47b779b9f9c2e7948ae8d45ea07a10f1ad07d135 17-Jul-2011 Svetoslav Ganov <svetoslavganov@google.com> Scroll events should indicate whether or not they have pixel data.

1. Updated all integet properties of AccessibilityRecord to be set to -1
so this is a clue to the client that this property is irrelevant for
the current event type.

bug:5031598

Change-Id: Ifedc15bf2249847cbc6cbcb83f5732e17b8b2903
ccessibilityRecord.java
4dfecf55c1afcc7ffe0cef931df67c4934a13e34 01-Jul-2011 Jim Miller <jaggies@google.com> Fix runtime reboot loop.

Change-Id: Ib0614e64e81e376fdbbe7c42a5e4aa8fb9c88ce9
ccessibilityManager.java
38e8b4e5bc3c93affdffbc064fd9db5aeccc3e8e 30-Jun-2011 Svetoslav Ganov <svetoslavganov@google.com> Updating accessibility documentation.

Change-Id: Ice8cf9ac6918b3bfa553776c68d4619fa6559cf8
ccessibilityEvent.java
ccessibilityEventSource.java
ccessibilityManager.java
ccessibilityNodeInfo.java
ccessibilityRecord.java
ackage.html
a20cdc06e599c6fef784a0a479e8329f95e4bd09 27-Jun-2011 Svetoslav Ganov <svetoslavganov@google.com> Fixing the build

Change-Id: Ic3664e5cd812d5fe59c9cf2657a441ca76a61135
ccessibilityEvent.java
ccessibilityRecord.java
a0156177cdc809795dd8bc5a19943dd2b6f82b66 27-Jun-2011 Svetoslav Ganov <svetoslavganov@google.com> Added scroll and text selection change accessibility events.

1. Added scrolling accessibility event to provicde feedback
when a view is scrolled.

Note: We need scroll events for ICS since even though we have
touch exploration the user does not know when something
is scrollable and not feedback is provided while scrolling.

bug:4902097

2. Added a text selection change event to provide feedback
for selection changes including cursor movement.

Note: We need the text selection change events for ICS since
even though the IME supports navigation in text fields
the user receives no feedback for the current selection/
cursor position.

bug:4586186

3. Added a scrollable property to both AccessibilityEvent and
AccessibilityNodeInfo. The info has to describe the source
in terms of all properties that make sense for accessibility
purposes and the event has this property (kinda duplicated)
since clients will aways want to know if the source is
scrollable to provided clue to the user and we want to avoid
pulling the info of the source for every accessibility event.

Change-Id: I232d6825da78e6a12d52125f51320217e6fadb11
ccessibilityEvent.java
ccessibilityNodeInfo.java
ccessibilityRecord.java
86398bda3dd869c67faa841a5d961316b5f4aa8a 22-Jun-2011 Svetoslav Ganov <svetoslavganov@google.com> AccessiblityNodeInfo#findAccessibilityNodesByText returns null if non found.

1. Updated the code to return empty list instead.

2. Updated the doc to explain that the search is done in the
sub-tree rooted at the info whose method is called.

Change-Id: I560d2563ed4772305bf2d7919560ef19baa30a1d
ccessibilityNodeInfo.java
34e350daf89aed09ac748c2185f4506772a63b3f 21-Jun-2011 Svetoslav Ganov <svetoslavganov@google.com> ListView do not fire accessibility hover events.

1. AccessibilityEvent was incorrectly setting the
connection of an owned AccessibilityRecord after
the record is initialized since during initialization
the record may become sealed.

bug:4724101

Change-Id: I39087dc8023c62252f31431ece23de901dc45972
ccessibilityEvent.java
eeee4d2c01d3c4ed99e4891dbc75c7de69a803fa 11-Jun-2011 Svetoslav Ganov <svetoslavganov@google.com> Final polish of the interrogation feature.

1. Added a new event type for notifying client accessibilitiy
services for changes in the layout. The event is fired at
most once for a given time frame and is delivered to clients
only if it originates from the window that can be interrogated.

2. Exposed the findByText functionality in AccessibilityNodeInfo.
This is very useful for an accessibility service since it allows
searching for something the user knows is on the screen thus
avoiding touch exploring the content. Touch exploring is
excellent for learning the apps but knowing them search is
much faster.

3. Fixed a bug causing an accessibiliby service not to receive
the event source in case of more than one service is registered
and one of them does not have paermission to interrogate the window.
The same event was dispatched to multiple services but if one
of them does not have interrogation permission the event is
modified to remove the source causing subsequent serivices not
to get the later.

4. Moved the getSource setSource methods to AccessibilityRecord
instead in AccessibilityEvent.

5. Hiden some protected members in AccessibilityRecod which should
not be made public since getters exist.

6. Added the View absolute coordinates in the screen to AccessibilityNodeInfo.
This is needed for fast computation of relative positions of
views from accessibility - common use case for the later.

7. Fixed a couple of marshalling bugs.

8. Added a test for the object contract of AccessibilityNodeInfo.

Change-Id: Id9dc50c33aff441e4c93d25ea316c9bbc4bd7a35
ccessibilityEvent.java
ccessibilityNodeInfo.java
ccessibilityRecord.java
AccessibilityInteractionConnection.aidl
8dffad68c7aa7da9a3d73d1ee41f3c4460f733b4 10-Jun-2011 Svetoslav Ganov <svetoslavganov@google.com> Bug fixes in the accessibility interrogation APIs

1. AccessibilityNodeInfo was not overriding equals.

2. ViewAncestor was not calling the callback for
setting the result of an interrogation request
thus making the system process wait upto the
maximal timeout.

Change-Id: I040a3c12d97f48aee319ba6414879546e71e9b8e
ccessibilityNodeInfo.java
9210ccbdc3629cead65a822d729e1783a773118c 09-Jun-2011 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityNodeInfo and AccessibilityEvent to initialized properly.

Change-Id: Id3a1b33a222790214820af4a8b49378f08e53558
ccessibilityEvent.java
ccessibilityNodeInfo.java
8643aa0179e598e78d938c59035389054535a229 20-Apr-2011 Svetoslav Ganov <svetoslavganov@google.com> Interrogation of the view hierarchy from an AccessibilityService.

1. Views are represented as AccessibilityNodeInfos to AccessibilityServices.

2. An accessibility service receives AccessibilityEvents and can ask
for its source and gets an AccessibilityNodeInfo which can be used
to get its parent and children infos and so on.

3. AccessibilityNodeInfo contains some attributes and actions that
can be performed on the source.

4. AccessibilityService can request the system to preform an action
on the source of an AccessibilityNodeInfo.

5. ViewAncestor provides an interaction connection to the
AccessibiltyManagerService and an accessibility service uses
its connection to the latter to interact with screen content.

6. AccessibilityService can interact ONLY with the focused window
and all calls are routed through the AccessibilityManagerService
which imposes security.

7. Hidden APIs on AccessibilityService can find AccessibilityNodeInfos
based on some criteria. These API go through the AccessibilityManagerServcie
for security check.

8. Some actions are hidden and are exposes only to eng builds for UI testing.

Change-Id: Ie34fa4219f350eb3f4f6f9f45b24f709bd98783c
ccessibilityEvent.java
ccessibilityManager.java
ccessibilityNodeInfo.aidl
ccessibilityNodeInfo.java
ccessibilityRecord.java
AccessibilityInteractionConnection.aidl
AccessibilityInteractionConnectionCallback.aidl
AccessibilityManager.aidl
cc4053e031371456fe54d51bbad1db721db4ae38 23-May-2011 Svetoslav Ganov <svetoslavganov@google.com> Accessibility serviceconfiguration via meta-data

Note: This is a part of two CL change and contains the
system changes without updates to the settings.

1. Added a mechanism for configuring an accessibility service via
XML file specified in a meta-data tag (similar to IMEs).

2. Added property for specifying a settings activity for an
accessibility service.

3. Refactored the APIs in AccessibilityManager to return
lists of AccessiblityServiceInfo instead ServiceInfo
since the former describes an AccessibilityService in
particular (similar to IMEs).

Change-Id: Ie8781bb7e0cdb329e583b6702a612a507367ad7b
ccessibilityEvent.java
ccessibilityManager.java
AccessibilityManager.aidl
d36a699410d8b65deede229df8414dde04c3421c 19-May-2011 Svetoslav Ganov <svetoslavganov@google.com> Fixing my build fix

Change-Id: I8393e0172367de730123b2fa9d743b1ecb2eb087
ccessibilityRecord.java
887e1a17eb9b12448f5929791b564565b2665aab 30-Apr-2011 Svetoslav Ganov <svetoslavganov@google.com> Touch exploration - nits

Change-Id: Ie49558e0a81218dbad70c02f81dd7a59b3213d5c
ccessibilityEvent.java
ccessibilityRecord.java
736c2756bf3c14ae9fef7255c119057f7a2be1ed 23-Apr-2011 Svetoslav Ganov <svetoslavganov@google.com> Touch exploration feature, event bubling, refactor

1. Added an Input Filter that interprets the touch screen motion
events to perfrom accessibility exploration. One finger explores.
Tapping within a given time and distance slop on the last exlopred
location does click and long press, respectively. Two fingers close
and in the same diretion drag. Multiple finglers or two fingers in
different directions or two fingers too far away are delegated to
the view hierarchy. Non moving fingers "accidentally grabbed the
device for the scrren" are ignored.

2. Added accessibility events for hover enter, hover exit, touch
exoloration gesture start, and end. Accessibility hover events
are fired by the hover pipeline. An accessibility event is
dispatched up the view tree and the topmost view fires it.
Thus predecessors can augment the fired event. An accessibility
event has several records and a predecessor can optionally
modify, delete, and add such to the event.

3. Added onPopulateAccessibilityEvent and refactored the existing
accessibility code to use it.

4. Added API for querying the currently enabled accessibility services
by feedback type.

Change-Id: Iea2258c07ffae9491071825d966dc453b07e5134
ccessibilityEvent.java
ccessibilityManager.java
ccessibilityRecord.java
AccessibilityManager.aidl
3fb3d7c4e756bd32d5abde0abca9ab52d559bc84 23-Apr-2011 Adam Powell <adamp@google.com> Revert "Touch exploration feature, event bubling, refactor"

This reverts commit ac84d3ba81f08036308b17e1ab919e43987a3df5.

There seems to be a problem with this API change. Reverting for now to
fix the build.

Change-Id: Ifa7426b080651b59afbcec2d3ede09a3ec49644c
ccessibilityEvent.java
ccessibilityManager.java
ccessibilityRecord.java
AccessibilityManager.aidl
ac84d3ba81f08036308b17e1ab919e43987a3df5 05-Apr-2011 Svetoslav Ganov <svetoslavganov@google.com> Touch exploration feature, event bubling, refactor

1. Added an Input Filter that interprets the touch screen motion
events to perfrom accessibility exploration. One finger explores.
Tapping within a given time and distance slop on the last exlopred
location does click and long press, respectively. Two fingers close
and in the same diretion drag. Multiple finglers or two fingers in
different directions or two fingers too far away are delegated to
the view hierarchy. Non moving fingers "accidentally grabbed the
device for the scrren" are ignored.

2. Added accessibility events for hover enter, hover exit, touch
exoloration gesture start, and end. Accessibility hover events
are fired by the hover pipeline. An accessibility event is
dispatched up the view tree and the topmost view fires it.
Thus predecessors can augment the fired event. An accessibility
event has several records and a predecessor can optionally
modify, delete, and add such to the event.

3. Added onPopulateAccessibilityEvent and refactored the existing
accessibility code to use it.

4. Added API for querying the currently enabled accessibility services
by feedback type.

Change-Id: Iec03c6c3fe298de3f14cb6efdbb9b198cd531a0c
ccessibilityEvent.java
ccessibilityManager.java
ccessibilityRecord.java
AccessibilityManager.aidl
43a17654cf4bfe7f1ec22bd8b7b32daccdf27c09 07-Apr-2011 Joe Onorato <joeo@google.com> Remove the deprecated things from Config.java. These haven't been working since before 1.0.

Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
ccessibilityManager.java
c0a8cd10a5829bf4e94ee073ba6f553128e9d8e9 19-Mar-2011 Svetoslav Ganov <svetoslavganov@google.com> Text in accessibility events not consistent

bug:2513822

Text added to accessibility events is truncated to max
length. However, the fromIndex and toIndex properties
are relative to the text before being truncated, thus
potentially our of bound. Removed the max length
limitation because test very rarely is longer that
500 characters and in the cases in which text is longer
than 500 character it will not be a real problem to
pass a bit more data through an IPC (very rarely).

Change-Id: Ie70ac630dfeb56d4f59079abb2f46d07582796b6
ccessibilityEvent.java
af7adab3e35863fff24e701039d5d04afbc060c5 17-Apr-2010 Svetoslav Ganov <svetoslavganov@google.com> 2604184 Expose hidden APIs for testing the AccessibilityManager separately from the backing AccessibilityManagerServcie

Change-Id: Ief5df31baa3c0990467625977e97cd066a671959
ccessibilityManager.java
7946d07183c2020b7421113e3a113763eac15a67 14-Apr-2010 Dianne Hackborn <hackbod@google.com> Merge "2593810 Accessibility event's parcelableData property not nullified during recycling"
9efd078c6bf513e8c6bf59ce57e6f9c038fdf3ee 14-Apr-2010 Svetoslav Ganov <svetoslavganov@google.com> 2593810 Accessibility event's parcelableData property not nullified during recycling

Change-Id: I88d6f3d63d7ff0fbdd88fb9cb642349029838b31
ccessibilityEvent.java
dd64a9b0d6ff0f15b22d02a108c5342c74db995a 14-Apr-2010 Svetoslav Ganov <svetoslavganov@google.com> 2593833 AccessibilityManager not properly initialized immediately upon registration in the AccessibilityManagerService

Change-Id: I0226bafc5e9c5b800c54019c9309394f1e5f9e88
ccessibilityManager.java
AccessibilityManager.aidl
75986cf9bc57ef11ad70f36fb77fbbf5d63af6ec 15-May-2009 svetoslavganov <svetoslavganov@google.com> Accessibility feature - framework changes (replacing 698, 699, 700, 701 and merging with the latest Donut)
ccessibilityEvent.aidl
ccessibilityEvent.java
ccessibilityEventSource.java
ccessibilityManager.java
AccessibilityManager.aidl
AccessibilityManagerClient.aidl