Commit Graph

1022 Commits

Author SHA1 Message Date
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
TreeHugger Robot
1133cf2b8a Merge "Hide WallpaperService.Engine colors API." into oc-dr1-dev 2017-06-16 04:43:23 +00:00
Jeff Davidson
b4c67ec3c8 Pass calling package to resolution UI.
The calling package is important for the UI to be able to tell the
user who is asking to perform the operation which needs consent. For
example, it should be able to tell the user which carrier app is
asking to download a profile.

Bug: 38049463
Test: TreeHugger + E2E verification
Change-Id: I890f811405cb05672e1271f092ddca60501e7ddc
2017-06-16 02:40:40 +00:00
Felipe Leme
18d0ef70b0 Throw IAE when service add null AutofillIds on SaveInfo methods.
Test: existing CtsAutoFillServiceTestCases pass
Test: manual verification using Contacts app
Test: manual verification adding a CTS test case that crashes the app, but such
      test cannot be commit because once the issue is fixed, it crashes the
      service (the right way to test this fix is through unit tests against
      exceptional conditions, but we don't support those on Autofill yet).

Fixes: 62649290

Change-Id: I8fc01fa929270219cd40035ff02eaf0dda5ecbfa
2017-06-15 16:33:52 -07:00
Jeff Davidson
707c372f09 Allow EuiccService IPCs to happen in parallel.
The (currently) undocumented behavior of oneway AIDLs is to serialize
IPCs made from the same client IBinder object. This is undesirable in
EuiccService as we want to respond to short-lived calls (like listing
subscriptions or getting the EID) while long-lived calls (like
download) are in progress. Introduce our own thread pool to work
around this behavior.

This also fixes a bug where uncaught exceptions thrown in the
implementation of an EuiccService method would be logged but never
trigger a callback on the client. Such exceptions now correctly crash
the app and trigger error callbacks in any active callers.

Bug: 62535655
Test: TreeHugger + verified subscription list during a download
Change-Id: I8b75af7fdc72117a163d81f7bf1447f6cc12ec6d
2017-06-15 11:42:36 -07:00
Lucas Dupin
2b0dab0da7 Hide WallpaperService.Engine colors API.
All apps that need it are bundled in DR.
We need to unhide it for MR1.

Test: make
Bug: 62490115
Change-Id: I58d0a020ec7b1af8cb2659d6957de4bf4d4fa596
2017-06-14 18:30:51 -07:00
Jeff Davidson
83f8bc81be eUICC API error code cleanup.
-Remove result classes in cases that a simple int will do. Split the
int error code space (now shared across all calls) into two parts -
predefined errors (0 or negative) and custom errors (positive).

-Replace "generic error" with "error" in naming.

-Remove detailed code from any result returned by the LPA. There is
still a detailed code in the platform API, which is equal to the
result code returned by the LPA.

Fixes: 38206601
Test: TreeHugger
Change-Id: I304081db2127a22d6dd67b6494b4f3279614d19c
2017-06-13 17:51:07 +00:00
Felipe Leme
5148d9fe81 Merge "Removed deprecated setExtras() method." into oc-dev
am: 7c41ddb975

Change-Id: Id74b4becd0f26d185cad3ecbe539aaa69f7ac89e
2017-06-12 19:05:34 +00:00
Felipe Leme
d52611258e Removed deprecated setExtras() method.
Bug: 37563972
Test: CtsAutoFillServiceTestCases pass

Change-Id: I7fef7c81267dad9097c711dbba849adf9d6b1cc5
2017-06-09 16:19:58 -07:00
Felipe Leme
f9a9bbf430 Merge "Use initial value on save when value didn't change." into oc-dev am: 2e723982d5
am: 08365011a2

Change-Id: I38b2e8096b7fe43a294afe400af093b49616335d
2017-06-07 00:57:16 +00:00
Felipe Leme
2e723982d5 Merge "Use initial value on save when value didn't change." into oc-dev 2017-06-07 00:25:11 +00:00
Felipe Leme
e8f6808079 Use initial value on save when value didn't change.
Otherwise, it will fail to call onSaveRequest() in scenarios where the service
required a field that was pre-populated for the app. For example, when the
service requires both a username and password, the app pre-populates the
username, and the user fills the password.

Test: new LoginActivityTest.testSaveOnlyTwoRequiredFieldsOnePrefilled() pass
Test: existing CtsAutoFillServiceTestCases pass

Bug: 62270740

Change-Id: Idbb11a8c2dab6741c18549c55dfdb71b483c2447
2017-06-06 13:49:42 -07:00
Jeff Sharkey
ec68b46bc8 Merge "Annotate @SystemApi with required permissions." into oc-dev am: c1406978a4
am: 7a2e4a8486

Change-Id: Ib629e25dbf047c110feaf03e4ff744b5c6df9aeb
2017-06-06 15:48:24 +00:00
Jeff Sharkey
d86b8fea43 Annotate @SystemApi with required permissions.
Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
2017-06-05 13:27:11 -06:00
Chris Wren
5a406e996c Merge "add channel and group tags to the notificaiton logs" into oc-dev am: 76e76a5c26
am: 6b88afda65

Change-Id: I840c89e34b00cf505e50897bc7ba433f37a67dff
2017-06-02 22:51:15 +00:00
Chris Wren
b39217972e add channel and group tags to the notificaiton logs
Change-Id: Icf029e42fca46262c9d9f8ff63f26de098f888bf
Fixes: 37714086
Test: runtest systemui-notification
2017-06-02 16:19:13 -04:00
Winson Chung
a9861756b5 Merge "Prevent showing voice session when it is already queued to be hidden." into oc-dev am: c672cb5ed9
am: 6d9ea8ec97

Change-Id: I9c0768835c6932c3ec4c55a26fdd63b0d5e6bac5
2017-06-02 16:25:07 +00:00
Winson Chung
fc3ec4c5e6 Prevent showing voice session when it is already queued to be hidden.
- It is possible for the session to be requested to be hidden before it
  gets the message to be shown and completes showing. This leads to an
  inconsistency where the voice interaction service implementation will be
  in a different state than the system for the session. Instead, we can
  cancel any pending show messages, and also clean up the pending show
  callback list immediately when the session is hidden.
- Also fixing up some error message codes when starting the assistant
  activity.

Bug: 38379130
Test: android.server.cts.ActivityManagerAssistantStackTests
Test: CtsVoiceInteractionTestCases
Test: CtsAlarmClockTestCases
Change-Id: I0d0e9c024367a47bda82d6a29ca89e18b7d69527
2017-06-01 22:58:01 +00:00
Adrian Roos
7374d3a4bc Credential FRP: Add implementation
- Adds a facility to store a credential handle that survives factory reset
- Adds a method to KeyguardManager for verifying the stored credential for SetupWizard
- Dark launches persisting the primary user's credential as the FRP credential (behind a default-off flag)

Future work:
- Use a separate GK handle / synthetic password for the FRP credential
- Enroll the FRP credential in verifyCredential for the upgrade case

Bug: 36814845
Test: runtest -x core/tests/coretests/src/com/android/internal/widget/LockPatternUtilsTest.java && runtest -x services/tests/servicestests/src/com/android/server/LockSettingsStorageTests.java && runtest -x services/tests/servicestests/src/com/android/server/SyntheticPasswordTests.java
Change-Id: Ia739408c5ecb169e5f09670cd9ceaa7febc2b1cc
2017-05-30 19:14:01 -07:00
Jeff Davidson
91c3d07fd9 Implement remaining core eUICC APIs.
Includes:

-getDefaultDownloadableSubscriptionList, which returns a list of
default subscriptions available for the device.
-getEuiccInfo, which returns an EuiccInfo object containing
non-sensitive information about the eUICC device.
-deleteSubscription, to delete a subscription.
-switchToSubscription, to switch to (or away from) a subscription.
-updateSubscriptionNickname, to update the nickname of a subscription
which is saved to the eUICC.
-eraseSubscriptions, to factory reset the eUICC.
-Settings.Global#DEFAULT_SM_DP_PLUS, a default SM-DP+ server which is
used to query for default subscriptions in
getDefaultDownloadableSubscriptionList.

These APIs follow the template of the APIs which have already been
implemented.

This completes the baseline implementation as designed; any additional
APIs or tweaks to the APIs will be tracked as separate bugs.

Fixes: 33075886
Test: Build/boot
Change-Id: I8057757c874f94e0c816af1ca071d656c8f145b9
2017-05-14 10:57:00 -07:00
Jeff Davidson
d02731ffff Define APIs for listing embedded subscriptions.
Two new APIs will list all embedded subscriptions along with any
active ones. One API requires the ability to read phone state and
returns all subscriptions. The other requires no special permissions
but will only return those subscriptions which the caller may manage
according to their metadata.

A list result from the LPA includes whether the current eUICC is
removable. If true, subscriptions in the list are considered
transient and always removed upon the next list update (i.e. SIM card
state change) unless that update includes the subscription. Otherwise,
they will be retained across future list operations for which the
current eUICC is removable. This allows callers to retain knowledge
about available embedded subscriptions on an inactive but still
accessible eUICC, as long as that eUICC is permanent.

The LPA may request a refresh of the list at any time; this is
intended to be used of the list or metadata is updated through a
non-API operation, e.g. a server-initiated metadata update. For
operations driven through a platform API, the list will be refreshed
automatically.

Bug: 33075886
Test: TreeHugger
Change-Id: I1887cbca835c304b9eb285fd972c7c8eaffa6e1d
2017-05-14 10:55:40 -07:00
Felipe Leme
321a829b4b Merge "Removed deprecated APIs." into oc-dev am: 4b91fe8699
am: 3eee11cb4d

Change-Id: I39859572bfd0b8e34d02ad96147364e0f4ce2ee5
2017-05-12 20:41:35 +00:00
Felipe Leme
73fedacfeb Removed deprecated APIs.
Test: CtsAutoFillServiceTestCases pass
Test: manual verification with existing service

Bug: 37563972

Change-Id: Ibea2810f9230f06e59d2d81e4ba853de54987956
2017-05-12 10:32:45 -07:00
Philip P. Moltmann
eb013ab31d Merge "Speed up structure update before OnFillRequest" into oc-dev am: 6ab00addb1
am: fc89e4fab1

Change-Id: Ie0b0674a5c415858ae0c3332761682597a0f78af
2017-05-11 09:38:50 +00:00
Ruben Brunk
cc9089817d Merge "Fix VR component enforcement for "2D in 3D" apps." into oc-dev am: 4d73fd5765
am: dbe6a24331

Change-Id: I7de9452a95aebf7a658d9d0552426146d1bf8e73
2017-05-11 04:51:09 +00:00
TreeHugger Robot
6ab00addb1 Merge "Speed up structure update before OnFillRequest" into oc-dev 2017-05-11 03:22:22 +00:00
Philip P. Moltmann
22567d3415 Speed up structure update before OnFillRequest
We now
- cache AutofillId -> ViewNode
- look for all AutofillIds at the same time (instead of one by one)

Bug: 37997043
Test: CtsAutoFillServiceTestCases
Change-Id: I094468ad885eed0cc506b4b62ff09c4af48570ff
2017-05-10 17:29:04 -07:00
Ruben Brunk
4d73fd5765 Merge "Fix VR component enforcement for "2D in 3D" apps." into oc-dev 2017-05-10 18:19:06 +00:00
Svetoslav Ganov
2b3385ab9d Merge "Allow null fill values to support authentication case" into oc-dev am: 90bcc1c8bc
am: 0e4f1bab09

Change-Id: I4f95cb012fd5d8b96c2beb097aa3b09c8c557b74
2017-05-10 06:43:26 +00:00
Svetoslav Ganov
a9379d0b44 Allow null fill values to support authentication case
If a dataset needs to be authenticated the fill service
may not have the values but needs to tell the system for
which fields to show the fill UI. We now allow passing
a null value to mean the view is a part of the dataset
semantically but its value should remain unchanged.

If a dataset has no values, i.e. the related autofill ids
are mapped to null, we cannot properly filter. In this case
we always match such items regardless what the user typed.

While at this improved accessibility support for filtering
to announce when the number of items being filtered changes.

Also while at this allowed a dataset authentication to return
a response which replaces the current response and refreshes
the UI. Matching datasets with null values to any text plus
allowing a response to be returned from a dataset auth enables
the use case where there is always "Import" item at the
end of the list which when clicked can show arbitrarily more
data entries associated to other apps.

Another change is that we now provide the client state
bundle on both request and dataset auth.

Finally, this change gets rid of dataset waiting auth and
response waiting auth concepts since the reference to the
response and the dataset is piped with the auth request.

Fixed a bug where the width of the autofill UI was not
properly measured by going over all items in the adapter.
Now we measure enough height to fit the first three and the
width id the width of the widest item in the adapter.

Test: Added LoginActivityTest#testDatasetAuthTwoFieldsReplaceResponse
      Added LoginActivityTest#testDatasetAuthTwoFieldsNoValues
      Added LiginActivityTest#filterTextNullValuesAlwaysMatched
      All autofill CTS tests pass

bug:37724701
bug:37424539

Change-Id: Ic19e5d7cbdbb7d110c9e7da0ad60b540cbf1aecf
2017-05-09 17:40:28 -07:00
Jeff Sharkey
d75ff5f2e8 Merge "Fix broken SystemApi docs." into oc-dev am: bbc764e83a
am: 43c327b4f2

Change-Id: Ic2e3b8ea13551e211a3f643de63900c9921eb931
2017-05-09 23:46:03 +00:00