Commit Graph

6236 Commits

Author SHA1 Message Date
Svetoslav
599c104289 Accessibility: Ensure fresh accessilbity focused and input focused nodes.
automerge: 27ad2e9

* commit '27ad2e95b40fd0ca76de384695498ea114d627ca':
  Accessibility: Ensure fresh accessilbity focused and input focused nodes.
2015-02-13 03:37:00 +00:00
Svetoslav
27ad2e95b4 Accessibility: Ensure fresh accessilbity focused and input focused nodes.
Change-Id: Ia3c84284843a415cdbbc2b6a9b06d9ddffbe0e04
2015-02-13 01:59:11 +00:00
Svetoslav
5521f39ff7 am c73cfa0f: Accessibiltiy: missed update to the previous patch.
* commit 'c73cfa0ffba344a83d61e2f4eb9715152a2807b8':
  Accessibiltiy: missed update to the previous patch.
2015-02-10 02:51:30 +00:00
Svetoslav
c73cfa0ffb Accessibiltiy: missed update to the previous patch.
Change-Id: I4c47d38f5e137dcc1c6db0561b3824a26572027d
2015-02-09 18:33:07 -08:00
Baligh Uddin
fbf9666f84 am b2ba6dfc: Merge "Accessibility: Handle a missed case when clicking focused views." into lmp-mr1-dev
* commit 'b2ba6dfc7b33ec9e58d9f556206440a26069e264':
  Accessibility: Handle a missed case when clicking focused views.
2015-02-10 01:07:08 +00:00
Svet Ganov
f33fe1f486 Accessibility: Handle a missed case when clicking focused views.
The special logic for clicking on views in accessibility mode should not
prevent event interception and if a view interceptes the gesture we must
clear the special flag and do normal event dispatch. Also once we have a
view handling the touch gesture we do not need the special flag as we
know what will handle the event. This tightly follows standard event
dispatching.

bug:19252492

Change-Id: I0c9764c5050ec73f5f7980f3f0340dd9509a725a
2015-02-07 10:36:59 -08:00
Svet Ganov
ff9b2525db am 34123f1c: Merge "Accessibility: ignore children of a view with node provider." into lmp-mr1-dev
* commit '34123f1ce83e39a5a6045b1a90a148cd4c514e7e':
  Accessibility: ignore children of a view with node provider.
2015-02-06 21:51:15 +00:00
Svet Ganov
41daba0052 am 060bca74: Merge "Accessibility: Handle a missed case when clicking focused views." into lmp-mr1-dev
* commit '060bca7444b8bf34fa95a6a71daf72fa8a85d78e':
  Accessibility: Handle a missed case when clicking focused views.
2015-02-06 21:51:11 +00:00
Svet Ganov
34123f1ce8 Merge "Accessibility: ignore children of a view with node provider." into lmp-mr1-dev 2015-02-06 21:49:02 +00:00
Svet Ganov
55bdb10c16 Accessibility: ignore children of a view with node provider.
A view that has an accessibility node provider should not have real children
since the provider is responsible to generate the node infos for the subtree
rooted at its hosting view. This is how the APIs are designed to work. However,
it is a common mistake and if this occurs the accessibility services
introspecting the screen get into an infinite loop.

The framework now does not add the real children of a view with a node provider
to the list of accessibility children. If the developer wants them exposed they
have to do that via the provider APIs as per contract.

bug:19297093

Change-Id: I1b01b1e4a85e1c397886fcd2506b434beb063687
2015-02-06 12:41:21 -08:00
Svet Ganov
0a2cceebd5 Accessibility: Handle a missed case when clicking focused views.
The clicking logic was missing the case where a child of the accessibility
focused view reacts to the injected down up events for clicking. This
results of a whole class of views being non-interactive. Now if an event
is targeting accessibility focus and the dispatching view group has this
focus, we clear the flag before dispatching to children, so they can
handle the event rather ignoring it becuase they are not accessibility
focused.

bug:19252492

Change-Id: I6ac25bb7a50b35bb638ca4bfb9fc4198d08c2d4d
2015-02-06 10:23:33 -08:00
Alan Viverette
80b381c073 am 9a166c7d: Merge "Mutate scroll bar drawables" into lmp-mr1-dev
* commit '9a166c7da3d77c4b9801dbe249f78149649d5b0e':
  Mutate scroll bar drawables
2015-02-06 00:25:33 +00:00
Alan Viverette
f8512ce081 Mutate scroll bar drawables
Bug: 19285726
Change-Id: I4bb596433c1fa1cc4e2fa53d0cdae992f9add858
2015-02-05 15:58:56 -08:00
George Mount
23eef1ec5e Fix TODO in javadoc for FEATURE_CONTENT_TRANSITIONS.
automerge: c3a043c

* commit 'c3a043cf0e1c91dcffc2cd596908266ba92a4c28':
  Fix TODO in javadoc for FEATURE_CONTENT_TRANSITIONS.
2015-02-05 00:15:50 +00:00
George Mount
c3a043cf0e Fix TODO in javadoc for FEATURE_CONTENT_TRANSITIONS.
Bug 19254085

Change-Id: I22d4c4e3d1d754ab96741eb0e0290d1ecfc05552
2015-02-04 15:27:56 -08:00
Svetoslav
b6b526eaaf Fix broken activation of the selected view in accessibility mode.
automerge: ded133c

* commit 'ded133c446fa9d0d23e6bde19a66fb2ce3980491':
  Fix broken activation of the selected view in accessibility mode.
2015-02-03 07:20:34 +00:00
Svetoslav
ded133c446 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
2015-02-02 23:17:17 +00:00
Svetoslav
55120a0f1a am 197adec3: Merge "Accessibility: Ignore overlapping siblings when computing a click location" into lmp-mr1-dev
* commit '197adec3656fc087d4aa56396e601bb8d04aa9fd':
  Accessibility: Ignore overlapping siblings when computing a click location
2015-01-27 04:26:51 +00:00
Svetoslav
197adec365 Merge "Accessibility: Ignore overlapping siblings when computing a click location" into lmp-mr1-dev 2015-01-27 04:23:44 +00:00
Chris Craik
00c53d66dd am cdd8b7f8: Merge "Invalidate outline on padding update" into lmp-mr1-dev
* commit 'cdd8b7f8199eb94ca133c8cebddf86adb0f9bb11':
  Invalidate outline on padding update
2015-01-27 01:13:00 +00:00
Chris Craik
c43a820945 Invalidate outline on padding update
bug:19113359

Ensures that ViewOutlineProvider#PADDED_BOUNDS is always kept up to
date with the view's padding.

Change-Id: I5e090bd8272e89d6b8b9055dbe95ef3d45333fcb
2015-01-26 14:40:29 -08:00
Svetoslav
a1ac6a0925 Accessibility: Ignore overlapping siblings when computing a click location
To click a view we were computing a click location by ignoring overlapping
views that are actionable. However, detection whether a view is actionable
is not always possible as the view may handle touch events directly. This
leads to unhandled edge cases. We are taking a conservative approach and
ignore all overlapping siblings regardless if clickable. This is also has
limitations but hopefully less frequent edge cases.

bug:18889611

Change-Id: Icea0b7b3e2d4ed53e50e01cb6a99b880be560b14
2015-01-23 16:13:43 -08:00
Svetoslav
6e9f276ff1 am 42a13865: Merge "Accessibilty: Cannot click on views in a scrollable container covered by the toolbar." into lmp-mr1-dev
* commit '42a13865a4527aaf907a6ced96f726b49b2cbbed':
  Accessibilty: Cannot click on views in a scrollable container covered by the toolbar.
2015-01-23 22:27:04 +00:00
Svetoslav
41fceb462b Accessibilty: Cannot click on views in a scrollable container covered by the toolbar.
In accessibility mode we calculate a point where to click in the accessibility
focused view as a bridge-gap solution before switching to accessibility click
actions. We cannot detect whether a view is covered by another one that consumes
all touch events, and therefore we may click on the wrong target. This was the
case with the toolbar. As a result a partially scrolled view in a scrollable
container covered by a toolbar cannot be activated and this is not an edge case.

bug:18986806

Change-Id: Ib41470c39806cec13e9b00b319879cd7f3412ab5
2015-01-22 18:51:47 -08:00
Bryce Lee
e036ce2e70 am 9320e9f0: Merge "Update javadoc for DEFAULT_FEATURES deprecation." into lmp-mr1-dev
* commit '9320e9f0a6af9269bc145ec7ab3d4b351f0614af':
  Update javadoc for DEFAULT_FEATURES deprecation.
2015-01-13 19:01:24 +00:00
Adam Powell
57744dd139 am 69c22e82: Merge "Add API for nested pre-processing of a11y events; fix ResolverDrawerLayout" into lmp-mr1-dev
* commit '69c22e82e9c3e95f4689a57320de3199ffd29262':
  Add API for nested pre-processing of a11y events; fix ResolverDrawerLayout
2015-01-13 19:01:19 +00:00
Bryce Lee
9320e9f0a6 Merge "Update javadoc for DEFAULT_FEATURES deprecation." into lmp-mr1-dev 2015-01-13 18:59:36 +00:00
Adam Powell
69c22e82e9 Merge "Add API for nested pre-processing of a11y events; fix ResolverDrawerLayout" into lmp-mr1-dev 2015-01-13 18:57:33 +00:00
Bryce Lee
aa1008cba4 Update javadoc for DEFAULT_FEATURES deprecation.
Bug: 18983343
Change-Id: I10936e292edf9146e7acca231632fb704054215c
2015-01-13 09:26:46 -08:00
Alan Viverette
82bdfcfadc Update docs for Window.setElevation(), apply changes immediately
automerge: 71922de

* commit '71922de6c8e407ff24bb1a500cb53bb1a647c758':
  Update docs for Window.setElevation(), apply changes immediately
2015-01-13 02:16:32 +00:00
Alan Viverette
71922de6c8 Update docs for Window.setElevation(), apply changes immediately
BUG: 18983689
Change-Id: I471104092d6296dc0ba2689da96783be088fbce8
2015-01-12 16:14:02 -08:00
Wale Ogunwale
42b0d10a83 am 1ea6afe1: Merge "Don\'t allow windows with invalid types to be added." into lmp-mr1-dev
* commit '1ea6afe1234b04de0f5b3f9ac5802b1c6d42e8ac':
  Don't allow windows with invalid types to be added.
2015-01-12 22:15:58 +00:00
Wale Ogunwale
74bf065e43 Don't allow windows with invalid types to be added.
Bug: 18950225
Change-Id: Ia7ead72d036c7628e0a97f8fe9fef2a35525e4df
2015-01-12 14:01:25 -08:00
Adam Powell
b6ab098bad Add API for nested pre-processing of a11y events; fix ResolverDrawerLayout
Add API for handling nested pre-processing of accessibility events
similar to nested pre-scroll or pre-fling. This allows custom views to
delegate a nested scroll to a parent via the accessibility system.

Use this functionality to allow opening the ResolverDrawerLayout via
accessibility commands.

Bug 18827274

Change-Id: Icd5a502605b78a861bb03e7b11923841a72eb9ab
2015-01-07 17:00:12 -08:00
Filip Gruszczynski
8117eda6f1 am 8c6b59f4: Merge "Add system api for disabling touch events in wallpaper behind the window." into lmp-mr1-dev
* commit '8c6b59f46da3e65ce157fe40a08f1c1fbba3e1c2':
  Add system api for disabling touch events in wallpaper behind the window.
2015-01-05 22:50:29 +00:00
Filip Gruszczynski
8c6b59f46d Merge "Add system api for disabling touch events in wallpaper behind the window." into lmp-mr1-dev 2015-01-05 22:46:14 +00:00
Alan Viverette
bde76419c1 am 1f3f47b3: Merge "Avoid double-translating View background" into lmp-mr1-dev
* commit '1f3f47b3680547dbb764db173e02d833e12d65a2':
  Avoid double-translating View background
2015-01-05 22:32:10 +00:00
Alan Viverette
b15703c9b4 Avoid double-translating View background
Reverse-translate the canvas before passing to Drawable.draw() so that
we don't double-apply the drawable's translation.

BUG: 18904688
Change-Id: I8450de9b240ddeae887b4e1003c0608da814a001
2015-01-05 14:20:42 -08:00
Filip Gruszczynski
fe56835934 Add system api for disabling touch events in wallpaper behind the window.
Bug: 18721756
Change-Id: I40b749a9916536d52042e5dd49a23575bedad754
2015-01-05 12:57:19 -08:00
Svetoslav
72da9ed886 am e5ea48a7: Fix a race in accessibility manager.
* commit 'e5ea48a7fe295a2815bab57f2e870901ce48b312':
  Fix a race in accessibility manager.
2014-12-29 18:23:54 +00:00
Svetoslav
e5ea48a7fe 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
2014-12-29 09:40:46 -08:00
Svet Ganov
f64d26fce0 am e130d6c1: Merge "Remove a bad heuristic when determining click location for accessibility." into lmp-mr1-dev
* commit 'e130d6c14ae2d4a6f703ef452a7e5741d84936a0':
  Remove a bad heuristic when determining click location for accessibility.
2014-12-19 22:36:56 +00:00
Svet Ganov
257ffbda60 Remove a bad heuristic when determining click location for accessibility.
As a bride-gap solution to click on partially covered views in accessibility
mode we compute a point on the screen where to send a down/up event pair.
A heuristic we used was that if the action target is covered by a view that
that has a touch listener we consider the target obscured by the one with
the listener. However, this generates false positives, for example the target
is covered by a view that observers touches for scrolling but not clicking.

bug:18782023

Change-Id: I31ff34011d45667f1eddda47373ec00e4a23dbf6
2014-12-19 11:59:21 -08:00
Alan Viverette
2f11125a71 am 9973643b: Merge "Give accessibility delegate the first pass at handling ACTION_CLICK" into lmp-mr1-dev
* commit '9973643bfc123fcc73803542ef8cb74e243907ce':
  Give accessibility delegate the first pass at handling ACTION_CLICK
2014-12-15 17:31:36 +00:00
Alan Viverette
9973643bfc Merge "Give accessibility delegate the first pass at handling ACTION_CLICK" into lmp-mr1-dev 2014-12-15 17:27:24 +00:00
Alan Viverette
cd305ae3ce Give accessibility delegate the first pass at handling ACTION_CLICK
Delegation is broken for widgets, but this fixes the most egregious issue
where TextViews that are top-level list items weren't handling CLICK
actions correctly. This will still need work, since now the focus action
won't run, but it's an improvement.

BUG: 18736135
Change-Id: I808ef628198946cc87f13c53d6245cd162a1e517
2014-12-12 14:13:24 -08:00
Svet Ganov
e608644a9f am 7486bc1f: Merge "Fix an edge case in computing click location in accessibility mode." into lmp-mr1-dev
* commit '7486bc1f5a8156e9b586ebb9c32ced218e668652':
  Fix an edge case in computing click location in accessibility mode.
2014-12-12 20:54:38 +00:00
Svet Ganov
7486bc1f5a Merge "Fix an edge case in computing click location in accessibility mode." into lmp-mr1-dev 2014-12-12 20:48:09 +00:00
Adam Powell
746079e2ee am 9a0799cf: Merge "Have ViewGroups without a parent clip child visible rects to bounds" into lmp-mr1-dev
* commit '9a0799cf6b7289b8127ffcb22291f5baf21b4035':
  Have ViewGroups without a parent clip child visible rects to bounds
2014-12-12 18:43:38 +00:00
Svet Ganov
9fc96c5371 Fix an edge case in computing click location in accessibility mode.
In accessibility mode to click a view we computed a point where to send
down and up touch events. The logic that computes where to send the
events was not clipping the bounds of the child to these of the parent.
As a result we wrongly computed we can send the events in a location
of the child that is outside of its parent, thus the click having no
effect or clicking the wrong thing.

bug:18672945

Change-Id: If9c452e7e5b196f699db33d37dbc6775d5d1622a
2014-12-11 22:33:48 -08:00