Commit Graph

9872 Commits

Author SHA1 Message Date
Rob Carr
bb8131b1d7 Merge "SurfaceView: Release Surface with SurfaceControl." into oc-dev am: 3630fd4e11
am: 9cbe611f4a

Change-Id: I1b18f556b4b42f81ddca69ae5ce420d7a612bf6b
2017-05-09 17:14:05 +00:00
Phil Weaver
2bd8bdc89f Merge "NumberPicker a11y (and a11y-inspired) fixes" into oc-dev am: 8d25b77e4c
am: bcc047ca4f

Change-Id: I7814872b4f530ed408587887225243a3fc1c59ce
2017-05-09 17:10:02 +00:00
Phil Weaver
2cb0972340 Merge "Fix crash in a11y cache" into oc-dev am: 64d6e3e11d
am: 2af1fda3ca

Change-Id: Ib2aaaf46de7a402e34288ea9dcad45b9b2ba55eb
2017-05-09 16:46:34 +00:00
Rob Carr
3630fd4e11 Merge "SurfaceView: Release Surface with SurfaceControl." into oc-dev 2017-05-09 15:49:29 +00:00
Phil Weaver
8d25b77e4c Merge "NumberPicker a11y (and a11y-inspired) fixes" into oc-dev 2017-05-09 15:36:00 +00:00
Phil Weaver
64d6e3e11d Merge "Fix crash in a11y cache" into oc-dev 2017-05-09 15:30:30 +00:00
Philip P. Moltmann
f227375052 Merge "Fix left/top in ViewNode for suppressed parents" into oc-dev am: 9f028643c2
am: b1e1d2bf0a

Change-Id: I9b96fdd581401389b2d1e494e3fab49683787518
2017-05-09 02:55:27 +00:00
Philip P. Moltmann
7e6ef30452 Merge changes I7c2c9411,Ibc72c84d,Ib3968644 into oc-dev am: f512575c68
am: 169989822e

Change-Id: I330cd6e1601584e3903a26b27047aae2e7b7c711
2017-05-09 02:18:52 +00:00
TreeHugger Robot
9f028643c2 Merge "Fix left/top in ViewNode for suppressed parents" into oc-dev 2017-05-09 02:15:43 +00:00
TreeHugger Robot
f512575c68 Merge changes I7c2c9411,Ibc72c84d,Ib3968644 into oc-dev
* changes:
  No need to deal with windowTokens
  Persistable accessibility ID from ContextWrappers
  Check callbacks when operting on UI
2017-05-09 01:49:58 +00:00
TreeHugger Robot
fa7392c901 Merge "SpellCheckerSession: Fix brittle finalizer pattern." 2017-05-09 01:45:43 +00:00
Philip P. Moltmann
2a8ff264b5 Merge "Read the autofill highlight from rootView context" into oc-dev am: f51b5f991c
am: cc5a7192e2

Change-Id: I2a4bf3bfb8edf9129f48eb3fb1f1cef8b1579e34
2017-05-08 23:22:32 +00:00
Philip P. Moltmann
f51b5f991c Merge "Read the autofill highlight from rootView context" into oc-dev 2017-05-08 23:06:31 +00:00
Svet Ganov
88d403034f Merge "Also check if view visible to user before engaging fill" into oc-dev am: f0de5cdd9a
am: d54f65521f

Change-Id: Ic946eaf470506021263173d529e5cd35702e93a3
2017-05-08 22:26:15 +00:00
TreeHugger Robot
f0de5cdd9a Merge "Also check if view visible to user before engaging fill" into oc-dev 2017-05-08 21:10:53 +00:00
Philip P. Moltmann
134cee27b8 No need to deal with windowTokens
we have a link to the client which is enough to find the views.

Also there was some cases where the windowToken was not updated
properly. This is moot now.

Also: Read a array of views from the client to speed up the
client<->AutofillManager communication.

Fixes: 38070352
Test: CtsAutoFillServiceTestCases
      1 Started autofill, saw fill UI
      2 Home button
      3 Kill activity in background
      4 Recents -> back to activity
      5 Saw fill UI restored
Change-Id: I7c2c9411204fa5d65867efae9b7296399121c3a2
2017-05-08 14:02:58 -07:00
Philip P. Moltmann
ff6d6d9492 Persistable accessibility ID from ContextWrappers
Only IDs beyond LAST_APP_ACCESSIBILITY_ID can be reliably used for
autofilling. Other ids might change occasionally.

All Views attached to activities get usable IDs. Hence if a
ContextWrapper wraps an activity forward the goodness.

Also make sure that we don't accidentially autofill an unsafe view.

Test: Before the messaging handed out unusable Ids because it uses a
      Contextwrapper. Now it hands out good ideas (accoring to dumpsys)
      CtsAutoFillServiceTestCases
Bug: 38070352
Change-Id: Ibc72c84d77197019939abd231e8960988af7a592
2017-05-08 13:29:17 -07:00
Robert Carr
de84443489 SurfaceView: Release Surface with SurfaceControl.
Not so drastic as we were releasing the Server side resources
anyway but the close guard is producing a strict mode warning.

Bug: 35955183
Test: cts-tradefed run cts -m CtsViewTestCases -t android.view.cts.SurfaceViewTest#surfaceInvalidatedWhileDetaching
Change-Id: Id250fff8d001d5d82458af1a732c0e123f925dad
2017-05-08 12:12:30 -07:00
Svet Ganov
01e1a62997 Also check if view visible to user before engaging fill
Test: autofill CTS tests pass 

bug:37753348

Change-Id: Ia16bff13f2cfdf1d315e3f45cc114ee13b145eb5
2017-05-08 19:11:05 +00:00
Philip P. Moltmann
e926aad53d Fix left/top in ViewNode for suppressed parents
If parents of a view got suppressed in the autofill structure the left
and top value are not relative to their direct parents anymore. They
need to be relative to the next non-suppressed parent.

This does not change any values for assist structures.

Fixes: 36060132, 37444334
Test: CtsAutoFillServiceTestCases + new ones that check for the left and
      top parameters of view nodes.
Change-Id: I914ad028c7ed2f93ce44210cbe1a2a710673cbbb
2017-05-06 12:29:10 -07:00
Phil Weaver
af00cb406c Merge "Properly translate text locations to screen coords" into oc-dev am: 2a86bad94c
am: c89c9dd3a9

Change-Id: I873787374ca65c0d18bf0c62416c4ffd4db69ef3
2017-05-06 15:46:00 +00:00
Phil Weaver
2a86bad94c Merge "Properly translate text locations to screen coords" into oc-dev 2017-05-06 15:29:24 +00:00
Philip P. Moltmann
c1e1810ca2 Merge "Report less data in structure to autofill provider" into oc-dev am: d19113b390
am: 889b15b4c2

Change-Id: Id60c55e06e94c3f639703beda9b249dcf0f8bd6c
2017-05-06 02:37:00 +00:00
Philip P. Moltmann
c368a240c9 Report less data in structure to autofill provider
Fixes: 35899963
Test: CtsAutoFillServiceTestCases, CtsAccessibilityTestCases,
      CtsAccessibilityServiceTestCases
Change-Id: Ia7dba3e252e7678c033d67bcf653e592f3134304
2017-05-05 14:20:11 -07:00
Phil Weaver
6c617f0a93 Properly translate text locations to screen coords
Using the same method as getBoundsInScreen.

Bug: 35095925
Test: Manually verified location with test app, ran a11y cts
Change-Id: I1eee2a4eb23912698be61c9030d92bbade1d743a
2017-05-05 14:19:58 -07:00
Abodunrinwa Toki
fc9b396c10 Merge "Reject smart selection if outside original selection." into oc-dev am: 6dcae2b91f
am: 4aeea2404c

Change-Id: I2ef8f172023446def205cfd0b3e6384ab12fee7a
2017-05-05 20:41:59 +00:00
TreeHugger Robot
6dcae2b91f Merge "Reject smart selection if outside original selection." into oc-dev 2017-05-05 20:29:33 +00:00
Abodunrinwa Toki
db8e72c5a8 Merge "TextClassifier: Remove debug logs." into oc-dev am: dc4fc1ebc2
am: 79c87bdf20

Change-Id: I6293ee9dbe6291b486ffd9b8fe01d1dcbe5cf96c
2017-05-05 18:01:37 +00:00
TreeHugger Robot
dc4fc1ebc2 Merge "TextClassifier: Remove debug logs." into oc-dev 2017-05-05 17:49:43 +00:00
Abodunrinwa Toki
b416297433 Reject smart selection if outside original selection.
- The aim is to be defensive and prefer to reject a selection if
  it is likely to be wrong.

Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 38019270
Change-Id: I35ebc84fb102373949366296434a31d899edfef3
2017-05-05 18:07:17 +01:00
Philip P. Moltmann
de97af1b6c Read the autofill highlight from rootView context
Fixes: 37792810
Test: CtsAutoFillServiceTestCases
      CtsUiRenderingTestCases:.testclasses.AutofillHighlightTests
Change-Id: Idb843d90f8abb591ba6845ab713745b0eafc4a92
2017-05-04 15:57:44 -07:00
Siarhei Vishniakou
6a9ad74c29 Merge "Adding feature: input device disable/enable." 2017-05-04 18:51:27 +00:00
Siyamed Sinir
914d42dbcd Merge "Don't copy NoCopySpans for assist and autofill" into oc-dev am: 5073b91236
am: fb37bba30d

Change-Id: I4dc4116e456af56969a4c7559e19fa6369f0df12
2017-05-04 00:48:08 +00:00
Phil Weaver
61a1fabab6 Fix crash in a11y cache
Caused by bad data from an app where a node was its own ancestor.
When the node changed, the copy in the cache was recycled while
flushing the descendants. Now recovering more gracefully.

Bug: 37674439
Test: Adding a unit test for this case, ran a11y cts and unit tests,
verified that the app reporting bad data no longer crashes TalkBack.
Change-Id: I10bc9df2b4821529334a19aa27719c1510187690
2017-05-03 17:33:43 -07:00
Siyamed Sinir
5073b91236 Merge "Don't copy NoCopySpans for assist and autofill" into oc-dev 2017-05-04 00:27:31 +00:00
Felipe Leme
58c32e88fa Merge "Removed deprecated ViewStructure.setUrl() method." into oc-dev am: 246cc5bf51
am: 5152055973

Change-Id: Ie3ea24baf32960eeaa8c85b71e25b8ec017212a1
2017-05-03 23:42:27 +00:00
TreeHugger Robot
246cc5bf51 Merge "Removed deprecated ViewStructure.setUrl() method." into oc-dev 2017-05-03 23:16:15 +00:00
Abodunrinwa Toki
15644eff8d TextClassifier: Remove debug logs.
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 34778895
Change-Id: I1478fe1a2849b1d4661a71ecbf9a27f38430ee28
2017-05-03 21:10:20 +01:00
Abodunrinwa Toki
3f6daab8eb Merge "TextClassifier: Append http:// to url intents that need one." into oc-dev am: 3baad0234b
am: 5adca9d964

Change-Id: I6c99ad6e10765f04d296e99e45df76aa5dc7aba7
2017-05-03 19:01:31 +00:00
TreeHugger Robot
3baad0234b Merge "TextClassifier: Append http:// to url intents that need one." into oc-dev 2017-05-03 18:49:19 +00:00
Evan Rosky
df10a77589 Merge "Don't focus search user-specified views which are invisible" into oc-dev am: 3b213ed438
am: 078728f100

Change-Id: I313b35f2f20ed4e0a0af5c45ba95816a2ed7d083
2017-05-02 21:18:23 +00:00
Abodunrinwa Toki
70d41cd792 TextClassifier: Append http:// to url intents that need one.
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 36504599
Change-Id: I5008225a6a3df2d8e07e4a9ae0e340a6582f9e7b
2017-05-02 22:12:33 +01:00
Evan Rosky
3b213ed438 Merge "Don't focus search user-specified views which are invisible" into oc-dev 2017-05-02 20:54:12 +00:00
Felipe Leme
a8fce3b29e Don't copy NoCopySpans for assist and autofill
For AssistStructure, and AutofillValue, create a copy of the text in 
setText and forText methods if it is a Spanned.

Fixes: 36838999
Test: cts-tradefed run cts -m CtsAutoFillServiceTestCases
Test: cts-tradefed run cts -m CtsAssistTestCases
Test: cts-tradefed run cts --test android.widget.cts.TextViewTest -m \
      CtsWidgetTestCases

Change-Id: I52e780fa9baa17c375d3945dc714171f41fd7db5
2017-05-02 13:33:07 -07:00
Abodunrinwa Toki
021119d5a2 Merge "Close file descriptor after SmartSelection is initialized." into oc-dev am: b950ac6b0f
am: 2deb2fab29

Change-Id: I7cf2ecfb78c64f626371dedab5394d0079c8cadc
2017-05-02 19:07:30 +00:00
Felipe Leme
61b7f12172 Removed deprecated ViewStructure.setUrl() method.
Fixes: 37623568
Test: CtsAutoFillServiceTestCases pass
Test: CtsAssistTestCases pass

Change-Id: I13cdf08f40ba3db31ddb3f104f99b7ab8839bd01
2017-05-02 10:58:42 -07:00
Phil Weaver
1d359a6d31 NumberPicker a11y (and a11y-inspired) fixes
- Sending scroll events for accessibility.
- Sending text update events when state changes.
- Blocking text updates during fling to reduce number of events.
- Making widget focusable by default, which keeps focus from
  moving to the rest of the UI when the text box becomes invisible.
- Managing visibility of the text box alongside IME state, so the
  IME won't decide to display the password keyboard during a fling.

Bug: 21494380
Bug: 37016501
Test: Ran NumberPicker CTS
Change-Id: I459d37d4a54c91e1cb5c7ec68fe0f012b25fb740
2017-05-02 10:43:34 -07:00
Abodunrinwa Toki
6ace893026 Close file descriptor after SmartSelection is initialized.
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 37446398
Change-Id: I6f6d927f447d3cc1dffaee2406ff240d0600eb19
2017-05-02 17:17:26 +00:00
Casey Burkhardt
337e2aae53 Merge "Refactor accessibility button support detection" into oc-dev 2017-05-02 04:05:30 +00:00
Evan Rosky
ca6b876575 Don't focus search user-specified views which are invisible
While searching for next user-specified focus, skip over any
views which are not visible. This will continue searching down
the chain until it either finds a visible view or until the
chain ends (at which point the normal findNextFocus search is
used).

This was causing problems in apps like the wallpaper selector
where focus would get stuck because calling requestFocus on an
invisible view is a no-op.

Bug: 37789849
Test: Added CTS. Checked that focus no-longer gets stuck in
      wallpaper app.

Change-Id: I1a52143bd6c63364418fe6250e6c3f83e2e1c726
2017-05-01 16:36:24 -07:00