• Svetoslav's avatar
    Added accessibility APIs for introspecting interactive windows. · 8e3feb15
    Svetoslav authored
    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
    8e3feb15
CleanSpec.mk 17.8 KB