Commit Graph

9721 Commits

Author SHA1 Message Date
Siyamed Sinir
5073b91236 Merge "Don't copy NoCopySpans for assist and autofill" into oc-dev 2017-05-04 00:27:31 +00:00
TreeHugger Robot
246cc5bf51 Merge "Removed deprecated ViewStructure.setUrl() method." into oc-dev 2017-05-03 23:16:15 +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
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
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
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
Casey Burkhardt
ad217d1f86 Refactor accessibility button support detection
- Moves logic to detect devices capable of supporting the
  accessibility button into AccessibilityManager from
  SettingsLib to avoid issues with resource shifting in the
  SUW binary

Bug: 37650567
Test: Existing Robolectric / Manual
Merged-In: Ibb2aaa3c2f79570df768cfa796fa890988ef82cc
Change-Id: I83bbecdf7836ae0de32ce7d39155ac0c111a8f15
2017-05-01 15:53:17 -07:00
Jeff Sharkey
3ba7117164 Merge "Updates based on API council guidance." into oc-dev 2017-05-01 18:36:25 +00:00
TreeHugger Robot
093eb12994 Merge "TextClassifier: API rename" into oc-dev 2017-04-30 17:15:55 +00:00
TreeHugger Robot
4c60abc9ae Merge "Address API council comments" into oc-dev 2017-04-30 06:43:15 +00:00
Abodunrinwa Toki
e0b57893c6 TextClassifier: API rename
getTextClassificationResult() -> classifyText()
 TextClassificationResult -> TextClassification

Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 37769880
Change-Id: I2d926e89058babf06bcff390bee3a45e965984e8
2017-04-30 01:06:03 +01:00
Jeff Sharkey
000ce80505 Updates based on API council guidance.
Test: builds, boots
Change-Id: I223faf55c1e1b4d81d11b4c8b2d93ccd131c969b
Fixes: 37775662
Fixes: 37748635
Fixes: 37673408
Fixes: 37672564
Fixes: 37672218
Fixes: 37638323
Fixes: 37637423
2017-04-29 13:14:17 -06:00
TreeHugger Robot
060f0f0341 Merge "A11y changes for API council" into oc-dev 2017-04-29 15:54:27 +00:00
Svet Ganov
f965b87a78 Address API council comments
bug:37769694
bug:37322491

Change-Id: I931cfb5ea5fef1505a97b169125ed2cdaaa3d6ff
2017-04-28 23:45:17 +00:00
Philip P. Moltmann
f5e4bfd856 Make autofilled highlight an attribute
Fixes: 37738299
Test: - CtsAutoFillServiceTestCases
      - CtsUiRenderingTestCases:.testclasses.AutofillHighlightTests

Change-Id: I6106f7b2e44d18cd8c80c084f25737e43cbc44de
2017-04-28 16:13:46 -07:00
Phil Weaver
be2922ff34 A11y changes for API council
Bug: 37749679
Bug: 37747749
Bug: 37737948
Bug: 37718183
Bug: 37720667
Bug: 37724600
Bug: 37708057

Test: Updating unit and cts tests, which still pass.
Change-Id: If28bdf985c4314e8e84dcd6510f406dd4e80dd38
2017-04-28 14:58:35 -07:00
Felipe Leme
c21f723ca2 Merge "Changed EXTRA_DATA_EXTRAS to EXTRA_CLIENT_STATE." into oc-dev 2017-04-28 20:29:49 +00:00
Felipe Leme
37a440fd8b Changed EXTRA_DATA_EXTRAS to EXTRA_CLIENT_STATE.
Test: CtsAutoFillServiceTestCases pass

Fixes: 37775662

Change-Id: I85c016c3eb84a439371ac707f78b01d9882b75e9
2017-04-28 11:03:57 -07:00
Evan Rosky
7666d6f967 Merge "removeAllViews should also clean-up focusedInCluster" into oc-dev 2017-04-28 17:05:46 +00:00
Felipe Leme
9f9ee25515 Improved Autofill logging.
- Removed ui.Helper.
- Replaced DEBUG and VERBOSE constants by sDebug and sVerbose.
- Added a shell command to dynamically set the constants.
- Removed obsoleted log statements.
- Changed log-level of some log entries.
- Removed unused methods.

Fixes: 36141126

Test: CtsAutoFillServiceTestCases pass
Test: manual verification

Change-Id: Ic08ee9a2adc10e63f49bbcc7ed126455462dc9c1
2017-04-28 06:56:23 -07:00
TreeHugger Robot
b63d261f9c Merge "Refactored Autofill to move starting flag out of Session." into oc-dev 2017-04-28 09:25:06 +00:00
TreeHugger Robot
3dfd827574 Merge "Changed HtmlInfo.getAttributes() to return List instead of ArrayList" into oc-dev 2017-04-28 06:42:22 +00:00
Felipe Leme
0aa4c5065d Refactored Autofill to move starting flag out of Session.
Otherwise, all onFillRequest() calls in the same partition would use
the same flags.

Fixes: 37675138
Test: existing CtsAutoFillServiceTestCases pass
Test: CtsAssistTestCases pass
Test: PartitionedActivityTest.testAutofill4ParitionsMixManualAndAuto() pass

Change-Id: I03c8a036637bae534904d4f41265e451088cf940
2017-04-27 23:38:14 -07:00
Svetoslav Ganov
70c0221813 Merge "Implement the rest of autofill importance modes" into oc-dev 2017-04-28 06:30:07 +00:00
Felipe Leme
09a70628da Changed HtmlInfo.getAttributes() to return List instead of ArrayList
Fixes: 37747396
Test: CtsAutoFillServiceTestCases pass

Change-Id: Ief53e6d71805f561577b73e57a9d36bc3769862a
2017-04-28 04:56:29 +00:00
TreeHugger Robot
17238a3f1a Merge "Fixed requestAutofill()." into oc-dev 2017-04-28 01:36:10 +00:00
Svet Ganov
fd31f85d0c Implement the rest of autofill importance modes
Test: CTS tests pass; augmented tests to verify new behavior

bug:36171235

Change-Id: Ieff2b8d7e1c3a3eba456deca7bed70c8e29c415e
2017-04-27 18:16:08 -07:00
TreeHugger Robot
e7172ff9fb Merge "AAPT2: Add workaround for non-standard package IDs" into oc-dev 2017-04-27 23:45:44 +00:00
Evan Rosky
776fa5f728 removeAllViews should also clean-up focusedInCluster
Other removes do this, somehow removeAllViews got overlooked

Bug: 37569764
Test: manual tested against docs.
Change-Id: I2f7699affb11dc370c4825ca9be669cf3b756c85
2017-04-27 11:28:01 -07:00
Andrii Kulian
bfe5aa23e8 Merge "Hide onMovedToDisplay callback" into oc-dev 2017-04-27 18:09:17 +00:00
Felipe Leme
d114642764 Fixed requestAutofill().
It should behave like notifyViewEntered() but passing a flag, but the current
implementation always start a new session, which is a problem on partitions.

Fixes: 37709350

Test: existing CtsAutoFillServiceTestCases pass
Test: new PartitionedActivityTest.testAutofill4PartitionsManually pass

Change-Id: Ia625a8fa067670e888c2861609ede039abf0f474
2017-04-27 07:09:30 -07:00
TreeHugger Robot
a97608caa8 Merge "SmartSelection: Use downloaded model file." into oc-dev 2017-04-27 13:50:58 +00:00
Adam Lesinski
4ca56978a9 AAPT2: Add workaround for non-standard package IDs
The dynamic ref table used to map build-time IDs to runtime IDs
is mainly used for shared resource libraries and has a few built-in
mappings (app 0x7f and framework 0x01).

Using a non-standard package ID like 0x80 causes a failure in package ID
lookup. The solution is to ship the dynamic_ref_table with an identity mapping
with any resource table that uses a non-standard package ID.

Adds some tests to ensure this works correctly.

Bug: 37498913
Test: make libandroidfw_tests
Test: make aapt2_tests
Change-Id: Ic3f67942384d34e7fdcbc94ded360e940e3ebc8a
2017-04-26 21:55:31 -07:00
Svet Ganov
48f10a2ab5 Handle package changes in autofill manager service
Autofill manager service was not observing package changes thus
we did not properly handle the cases of the service being updated,
added, and removed. Handling, additions is needed to properly
support restore from a backup. Fixed a few missing locks.

Test: all autofill CTS tests pass and manually tested update, add,
      and remove of autofill services.

bug:36638606
bug:36978445

Change-Id: Idd47891774ba2a4e562a1952cbb5a048211fd4e3
2017-04-26 19:22:05 -07:00
Andrii Kulian
cadaccedac Hide onMovedToDisplay callback
There are no usages in O, so not exposing it for now.

Bug: 37638275
Test: android.server.cts.ActivityManagerDisplayTests
Change-Id: I30a8549191ac1cfad0fb1e4db71a702862c0e503
2017-04-26 18:09:54 -07:00
Felipe Leme
62bb027d12 Merge "Provide support for optimized ACTION_REQUEST_SET_AUTOFILL_SERVICE." into oc-dev 2017-04-26 23:46:21 +00:00
Rob Carr
bd1ef76684 Merge "Fix logspam NPE." into oc-dev 2017-04-26 21:43:30 +00:00
Abodunrinwa Toki
146d0d4f6d SmartSelection: Use downloaded model file.
This cl introduces support for reading the smart selection model
file downloaded via ConfigUpdater. It decides on whether to use this
file based on the language and version of the model file.

Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 34780396
Change-Id: Ie17b9908a0b4eac16a671b0bd633a89da7bc3fee
2017-04-26 21:31:16 +01:00
Felipe Leme
bb81092a31 Provide support for optimized ACTION_REQUEST_SET_AUTOFILL_SERVICE.
Also removed obsolete 'cmd autofill save'

Bug: 2153814
Test: manual verification

Change-Id: I082e6bb098e9be5d9e26d0941efcf6f28ab01e1d
2017-04-26 12:07:17 -07:00
Felipe Leme
5f7979222d Merge "Provide a way to set AutofillId on ViewStructure." into oc-dev 2017-04-26 18:38:21 +00:00
TreeHugger Robot
db8f2fc025 Merge "Fix ViewOverlay#onDescendantInvalidated" into oc-dev 2017-04-25 23:15:52 +00:00
Felipe Leme
e4f30650ac Provide a way to set AutofillId on ViewStructure.
So far that was done indirectly by public methods that could
be overridden in away that does not set the proper id in the structure,
which would crash apps.

Bug: 36171235
Test: modified VirtualContainerActivityTest#testAutofillOverrideDispatchprovideAutofillStructure

Change-Id: I3f1c64020125cbb8349971a0bc52ccd1e0c81e62
2017-04-25 14:12:03 -07:00
Chris Craik
bc44b1a693 Fix ViewOverlay#onDescendantInvalidated
Fixes: 37307001
Test: android.view.ViewInvalidateTest

Also removes damageChildInParent, since it's not called anywhere.

Change-Id: Ic81d4465e4828c5826957ace2c44ac263b4662bd
2017-04-25 13:32:19 -07:00
Robert Carr
3651ab8e09 Fix logspam NPE.
Harmless but spammy.

Bug: 37622525
Test: Repro from bug.
Change-Id: I7fa2404fddb0c62efdd4553d5c61e92ae8f3a876
2017-04-25 12:05:34 -07:00
Phil Weaver
efb859f2af Merge "Allow a11y listeners to specify handlers" into oc-dev 2017-04-25 17:18:03 +00:00
TreeHugger Robot
fc513f98d7 Merge "Added APIs that let AutofillService implementations set themselves as such." into oc-dev 2017-04-25 08:56:03 +00:00