Commit Graph

1052 Commits

Author SHA1 Message Date
Felipe Leme
c0c6ab4ac1 Minor Autofill javadoc fix.
Test: no, thanks!

Bug: 64125551

Change-Id: Iba4817f682670e9fd6d891ae221e1fa415252e99
2017-07-31 10:12:08 -07:00
Felipe Leme
cb96f39155 Uses ParceledListSlice to allow larger number of datasets.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testAutofillLargeNumberOfDatasets
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 63669555

Change-Id: If0847da3bafa1bfd80ee8925e17aace82010aec9
2017-07-27 09:44:11 -07:00
Felipe Leme
e802d18f49 Merge "Don't show Save UI when values filled by user belong to a dataset." into oc-mr1-dev 2017-07-27 15:11:22 +00:00
Felipe Leme
d0b18d665f Don't show Save UI when values filled by user belong to a dataset.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 63068654

Change-Id: Ia9c42d57b0e7c316bfd3c0ee29816db18ac478c1
2017-07-26 15:59:38 -07:00
Julia Reynolds
7635ab0a1b Differentiate dnd countdowns/countdowns to an alarm
Test: runtest systemui, manual
Change-Id: I63b6c6b4128c7c3551efc64f54ce3e55ab2de54d
Fixes: 36569568
2017-07-26 16:07:12 -04:00
Julia Reynolds
04964fe069 Merge "Fix xml loading for managed services" into oc-mr1-dev 2017-07-21 19:52:50 +00:00
Albert Chaulk
95a3528866 Merge "Add modified API to send more information to VrCore" into oc-dr1-dev
am: c48e304bbf

Change-Id: I1c93664e2300cb9e234cfbc1c453da30a60e61af
2017-07-21 18:33:53 +00:00
Julia Reynolds
d1bf5f0108 Fix xml loading for managed services
Noticed while adding a shell cmd to toggle notification assistants,
which is also included

Bug: 62263757
Test: runtest systemui-notification
Change-Id: I9bc0ee857abb8b9f60ab18ad740ca0a3b7d754ff
(cherry picked from commit 88facd4d9a)
2017-07-21 13:07:48 -04:00
Lucas Dupin
98eabbd68a Unhide invalidateColors API
Live wallpapers should be able to report their colors
to have better integration with O-DR visual framework.

Test: make
Bug: 62490115
Change-Id: Id4a61245087a0c6530f56e474ce258ca9528becc
Fixes: 63585249
2017-07-20 21:39:15 +00:00
Albert Chaulk
16d2397e2d Add modified API to send more information to VrCore
Currently, null is sent when a 2D intent is running.
Sending the component name and a flag instead allows
VrCore to determine which intent is currently running
and which layers on the display correspond to this
application.

The process ID of the current intent is also sent,
to allow association of buffers to the VR app.

Bug: 63709047, 63115025
Test: manual with prints

Change-Id: I164b577f2c578867fb953d92074ef3d2d31221a1
2017-07-20 16:44:47 -04:00
Felipe Leme
22101ca5a9 Don't show a custom description if any transformation fail.
That could result in an inconsistent, confusing UI. For example, if the
successfully description for a credit card was "Exp. date: 04/20", one with a
failure could be "Exp. date: /20" - it's better to not show a custom description
in these cases.

Test: CtsAutoFillServiceTestCases pass
Test: CustomDescriptionTest.failFirstFailAll
Test: CustomDescriptionTest.failSecondFailAll

Bug: 62534917

Change-Id: I6554e3470ead2f84d7ef8715192d863c01ab1190
2017-07-18 17:40:45 -07:00
Felipe Leme
906b853717 Uses Pattern instead of String for new Autofill Save API.
Test: CtsAutoFillServiceTestCases pass
Bug: 62534917

Change-Id: Ic285838465c2aa55e4935cdd8f00c551faa6a972
2017-07-18 17:40:45 -07:00
Felipe Leme
7fc29dd931 Changed SaveInfo so it supports just optional ids.
Test: existing CtsAutoFillServiceTestCases pass
Test: new tests on LoginActivityTest pass
Test: new SaveInfoTest pass

Fixes: 38044993

Change-Id: Iefcf9610b27361585444157616325e9e9a89158f
2017-07-18 17:40:44 -07:00
Julia Reynolds
eb3dca71b5 Send less ranking reconsiderations and updates
- NotificationIntrusivenessExtractor does not need to reconsider
ranking for non intrusive notifications
- All adjustments (by group helper and the assistant) have been moved to
extractors so we can selectively send ranking updates instead of always
sending them.

Fixes: 62827235
Test: runtest systemui-notification
Change-Id: I2ea746c3883049abac0752788a3f4c2fa50c8064
2017-07-17 16:55:24 +00:00
TreeHugger Robot
d16aeddbd1 Merge "Make CustomDescription safe against crashes" 2017-07-12 22:29:10 +00:00
TreeHugger Robot
72c323964c Merge "Verify regex for SimpleRegexVerifier" 2017-07-12 22:24:18 +00:00
Philip P. Moltmann
3858aa6736 Make CustomDescription safe against crashes
... And allow users of the public APIs use Transformations.

Test: bit CtsAutoFillServiceTestCases:.CustomDescriptionTest
Bug: 62534917
Change-Id: I6b7b7d5e343e78f2f0381303451e08bb16c5c3e6
2017-07-12 09:38:08 -07:00
Philip P. Moltmann
f28764d900 Verify regex for SimpleRegexVerifier
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
          --test=android.autofillservice.cts.SimpleRegexValidatorTest
Bug: 62534917
Change-Id: I63a887643bff0f8d584069ee47f091b0edb8684c
2017-07-12 08:38:41 -07:00
Philip P. Moltmann
0e3e6f8274 Handle failures in validators
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
          --test=android.autofillservice.cts.ValidatorTest
Bug: 62534917

Change-Id: I3aad06cd2e8b6caf7238e420727aca0cb3703bc5
2017-07-12 08:05:01 -07:00
TreeHugger Robot
071072f33e Merge "Implement Luhn checksum algo" 2017-07-12 01:06:55 +00:00
Philip P. Moltmann
4e5ce39039 Implement Luhn checksum algo
Ignore all non-digits. If only digits should be allowed, the
developer can use a combination of SimpleRegexValidator and
RequiredValidators.

Bug: 62534917
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
          --test=android.autofillservice.cts.LuhnChecksumValidatorTest

Change-Id: I4a7c68a236c3d4cb967f1bc61115df89e584a86d
2017-07-11 09:19:31 -07:00
Philip P. Moltmann
2a9a771c65 Stabilize order of options in ImageTransformation
If two options match a the one added first is picked instead of a random
one.

Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
           --test=android.autofillservice.cts.ImageTransformationTest

Change-Id: I17d6b93d406fe6aa70646dd0432091aab0ce55c0
2017-07-11 08:07:27 -07:00
TreeHugger Robot
99f0e0ef1e Merge "Verify regex on ImageTransformation" 2017-07-11 01:40:09 +00:00
Philip P. Moltmann
de78fabb74 Verify regex on ImageTransformation
Also change the constructor of the Builder of this class

Bug: 62534917
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
Change-Id: Ie54f3a1d4b3a0ecd25945d3deafb4858423f926e
2017-07-10 16:54:52 -07:00
Philip P. Moltmann
ebbe2d4899 Verify regex on CharSequenceTransformation
... Also
- change the constructor of the Builder of this class
- Do not crash if the subsitutions for the regexes are invalid

Change-Id: I965d5830f4932eb40ec22d7fa308815955920a99
Bug: 62534917
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
2017-07-10 15:15:48 -07:00
TreeHugger Robot
de295549d1 Merge "Hide some systemapi methods" 2017-07-10 17:59:36 +00:00
Julia Reynolds
7ca33079fd Hide some systemapi methods
Test: make
Change-Id: I0234ca06f68f0a25e1923e171cb6ef19d848aecd
Fixes: 62342239
Fixes: 62264035
2017-07-05 09:17:49 -04:00
Andrew Scull
0e5d5b1c8c PDBS: add package check for getMaximumDataBlockSize()
This method is only useful to the package that writes data to the block
so this applies the same security check as the write() method.

getDataBlockSize()'s security check was only relaxed to use a permission
as it is used by other system apps to determine whether the block
contains data and hence is in use (see ag/593371).

Fix: 62348164
Test: add a Google account to the device causing gmscore to call the
method
Change-Id: I7e71ea236899bf2e4df7cb26ae285b414e9e6565
2017-06-30 15:37:03 +01:00
TreeHugger Robot
ee39d54a8d Merge "Initial implementation of the new Save APIs." 2017-06-29 02:43:36 +00:00
Felipe Leme
979013d027 Initial implementation of the new Save APIs.
Test: manual verification with sample app (CTS tests coming later)

Bug: 62534917

Change-Id: I085a9c933bb5e8316d673976e059e13abd7098e5
2017-06-28 15:13:21 -07:00
Jeff Davidson
7b69a86b02 Add EuiccManager#retainSubscriptionsOnFactoryReset API.
By default, all subscriptions are wiped on first boot after a factory
reset. This ensures that if data is wiped outside of userspace (e.g.
in fastboot/recovery), the profiles are wiped, as there's no way to
offer this option to users in those modes - the radio isn't available
for us to access the eUICC.

This API provides a way to bypass this wipe if the user opts to retain
the policies for a wipe done from userspace (e.g. by unchecking the
"Wipe eUICC" checkbox in platform settings before wiping). We tell the
LPA to note this and skip the wipe on the ensuing factory reset.

Change-Id: I2fe472417497e28b043841a5aa2dc9efa45ebbff
Test: TreeHugger
Fixes: 62681577
2017-06-27 09:23:07 -07:00
TreeHugger Robot
776220d029 Merge "Pass calling package to resolution UI." into oc-dr1-dev 2017-06-27 00:48:39 +00:00
Felipe Leme
91d763f1b5 Improved documentation for AutofillService package:
am: 2ef19c1d73

Change-Id: I67d6649d4acb84ebb598c1ebceb3c3ed58cfd0c0
2017-06-23 00:36:35 +00:00
Felipe Leme
2ef19c1d73 Improved documentation for AutofillService package:
- Moved (and expanded) overall documentation from FillResponse to
  AutofillService.
- Improved SaveInfo documentation.
- Improved FillRequest documentation.
- Improved Dataset documentation.

Bug: 37567048
Test: ran 'm -j doc-comment-check-docs' and checked resulting HTML

Change-Id: I157893deac06a5ed5e1cb7fd082da485f227b9ee
2017-06-22 15:25:31 -07:00
Felipe Leme
a4d103d480 Merge changes from topics 'bug_62802026_take_2', 'bug_62802026' into oc-dev
am: 4f7fd183eb

Change-Id: Ibd7aebe46d1bb419ca33f8f38999fa9ab0d981ff
2017-06-21 04:02:27 +00:00
Felipe Leme
9cd1c52867 Fixed how FillEventHistory is reset and clarified javadoc.
am: 2e30c6f371

Change-Id: I55eb6f4a11e28ef2a8171c62848eb2b067f05ba1
2017-06-21 04:00:27 +00:00
TreeHugger Robot
4f7fd183eb Merge changes from topics 'bug_62802026_take_2', 'bug_62802026' into oc-dev
* changes:
  Don't add FillEventHistory events to the wrong session.
  Fixed how FillEventHistory is reset and clarified javadoc.
2017-06-21 03:45:50 +00:00
Felipe Leme
d013bcea97 Don't add FillEventHistory events to the wrong session.
The AutofillSession.getFillEventHistory() method returns only the event history
for the last onFillRequest(). In the scenario where the user switches
activities and the server has multiple sessions open, only the events for the
last session should be recorded.

Test: existing CtsAutoFillServiceTestCases pass
Test: LoginActivityTest.checkFillSelectionFromPreviousSessionIsDiscarded

Fixes: 62802026

Change-Id: I447ed77c2167095867b35d616b5cf2ae43aa28db
2017-06-20 17:31:20 -07:00
Felipe Leme
284ec6eec7 Merge "Removed deprecated, hidden method." into oc-dev
am: 17efecf48f

Change-Id: Id79feb953db68214e848e9bb3f8f3aaec6d56824
2017-06-20 22:43:23 +00:00
Felipe Leme
2e30c6f371 Fixed how FillEventHistory is reset and clarified javadoc.
Test: existing CtsAutoFillServiceTestCases pass
Test: checkFillSelectionIsResetAfterReturningNull()
Test: checkFillSelectionIsResetAfterReturningError()
Test: checkFillSelectionIsResetAfterTimeout()

Bug: 62802026

Change-Id: I389d95fc13c08f1056960e5f67e131c8dc306401
2017-06-20 14:54:05 -07:00
Felipe Leme
bce4b7f127 Removed deprecated, hidden method.
Test: existing CtsAutoFillServiceTestCases pass
Bug: 37563972

Change-Id: I10c5a2b16b422694d72b3ccaf6629d50247c7f49
2017-06-20 10:21:41 -07:00
Felipe Leme
51ed7f4e6b Merge "Fixed updateAutofillValue() when mText is not set." into oc-dev
am: 4eaba84065

Change-Id: I7603a791f8c149799a0adf9e0fe735483ce1be1a
2017-06-20 00:36:12 +00:00
Felipe Leme
266752317b Fixed updateAutofillValue() when mText is not set.
updateAutofillValue() was crashing some apps when the mText was not set at the
time it was called. One solution would be to not set mText at all - since the
Autofill Service should rely only on getAutofillValue() - but that could break
existing services.

Hence, a safer solution is to set that field if it's null.

Test: existing CtsAutoFillServiceTestCases tests pass
Test: manual verification using Fly Delta app

Fixes: 62751039

Change-Id: I91a8e0ed5db4148f5eb5729b8e254aa3531f15e4
2017-06-19 11:43:33 -07:00
Felipe Leme
1c5cb925b8 Merge "Use an optimized findViewNodeByAutofillId(id) to get just one node." into oc-dev
am: a89414962d

Change-Id: I70d76618c929bdfeee715909c70a678fbc5f4a3e
2017-06-16 21:59:55 +00:00
TreeHugger Robot
a89414962d Merge "Use an optimized findViewNodeByAutofillId(id) to get just one node." into oc-dev 2017-06-16 21:45:46 +00:00
Jeff Davidson
79c7a85d60 Merge "Allow EuiccService IPCs to happen in parallel." into oc-dr1-dev 2017-06-16 20:50:09 +00:00
TreeHugger Robot
04d2ec59e8 Merge "WallpaperColors refactor" into oc-dr1-dev 2017-06-16 20:05:03 +00:00
Felipe Leme
bc8386db5b Merge "Throw IAE when service add null AutofillIds on SaveInfo methods." into oc-dev
am: 6cde68752c

Change-Id: I9efd96bcd649bd23db28136aa4afca16a677e9ea
2017-06-16 19:34:01 +00:00
Felipe Leme
94b56207a4 Use an optimized findViewNodeByAutofillId(id) to get just one node.
Session was using findViewNodesByAutofillIds(ids) before, which not only was
not optimal, but error prone (for example, it could return a non-empty array
with an empty value).

Test: CtsAutoFillServiceTestCases pass
Fixes: 62532979

Change-Id: If984f1263cc3f2aac1d1e098687fe02d73c55211
2017-06-16 11:51:49 -07:00
Lucas Dupin
84b89d9d59 WallpaperColors refactor
Hiding color extraction into WallpaperColors.
This enables us to create WallpaperColors from a a Bitmap
or Drawable.

Fixes: 62197187
Fixes: 62490115
Test: runtest --path cts/tests/app/src/android/app/cts/WallpaperColorsTest.java
Change-Id: I614cfa205e02b551a141642eac6de21251c3bff6
2017-06-16 09:27:43 -07:00