Commit Graph

137 Commits

Author SHA1 Message Date
Reema Bajwa
45af4086e3 Merge "Propagate SEET_ALLOWED_PROVIDERS permission to get flow" into udc-dev 2023-05-10 18:01:39 +00:00
Reema Bajwa
b89ee43ee3 Propagate SEET_ALLOWED_PROVIDERS permission to get flow
Test: Built locally
Bug: 281599707

Change-Id: I94db6c7a3b68ac2dc40da09be2a777225bdeb169
2023-05-09 19:59:49 +00:00
Reema Bajwa
a24961f087 Merge "Revert usage of ParceledListSlice in UI interface" into udc-dev 2023-05-09 19:57:23 +00:00
Omer Ozer
afd4518804 Add a distinct name for cred reg flow.
Bug: 274494843
Bug: 273353677
Test: manual
Change-Id: I90b1fa367a7a77dfdb91be67f7de7ceb4606338a
2023-05-06 00:10:41 +00:00
Reema Bajwa
fa3d854ac3 Revert usage of ParceledListSlice in UI interface
Causes exception when screen is rotated

Test: built & deployed locally
Bug: 280524540

Change-Id: I45d2b5cbf6309c4809c3a0d3343c441a991e8e2f
2023-05-05 15:26:21 +00:00
Jerry Shi
93e0df8661 Support setting primary provider
Test: local test
Bug: 280492574
Bug: 280454916
BUg: 280306636

Change-Id: I507dcf24eb4eb142734436cd21d422edbb2a7868
2023-05-04 07:23:07 -07:00
Helen Qin
7159bca35a Add default provider id to the UI-backend interface
Bug: 279857017
Test: local build
Change-Id: I7dce4224be444444247b4348f452f3276033fd74
2023-04-28 00:02:38 +00:00
Reema Bajwa
eafdde3094 Use ParceledListSlice for get & create responses
ParceledListSlice breaks up the parcel if it is too big for
the transaction

Test: built & deployed locally
Bug: 269313925

Change-Id: I7f70e72bfd225ec11ee8650593cc7290d001ddca
2023-04-10 23:58:03 +00:00
Reema Bajwa
9a0c76514e Hide CredentialOption constructor
Test: built & deplpoyed locally
Bug: 277213208

Change-Id: I75ab03c39ecc9a4fa7f0dd35fc9ec58f4a1f9433
2023-04-06 19:42:17 +00:00
Becca Hughes
5b79181920 Merge "Move DeviceConfig check to Service" into udc-dev 2023-04-05 16:04:06 +00:00
Becca Hughes
3b1802458d Move DeviceConfig check to Service
Moves DC feature flag evalutation to
service since clients do not have
permisssion.

Test: gts
Bug: 275754582
Change-Id: Ic56cae1ad52d9df2daab6c82da0e57087a91408c
2023-04-03 23:17:05 +00:00
Helen Qin
e1ec1bafb8 [CredManUi] Support UI for app cancellation
Bug: 274147089
Test: manual (see bug for screenshots)
Change-Id: Ie65445f69285ddc21a5c66ca6eed000185bfbf11
2023-04-02 22:24:47 +00:00
Helen Qin
e31d0c0e56 Switch the activity parameter to context.
Per api review feedback, switch the activity parameter in the Credential
Manager APIs to context.

Bug: 273932308
Test: CTS tested
Change-Id: I5e98821c6fb2e7a5585dfc429523e36f171119f2
2023-03-28 20:24:12 +00:00
Omer Ozer
6939babc97 Changing flat request string to a set of element keys.
Bug: 274667622
Test: local
Change-Id: I719483380d86f12b17fec2d1ca58bb1b8ac56a64
2023-03-27 16:21:47 +00:00
Reema Bajwa
4c15b904f5 Pass set allowed providers permission to UI
Test: local build & deploy + CTS tests
Bug: 274667625

Change-Id: Id152608626287269959b66666d83a157e1f2c982
2023-03-23 23:12:56 +00:00
Helen Qin
b1d1033b49 [CredMan] Unhide the getPendingCredential api.
Per partner feedback, expose a version of getCredential api that splits
prefetching candidates and selection UI into two separate calls. This
allows performing prefetch work and an early time and delaying the UI to
a later time which will be significantly faster to surface upon request.

Bug: 273308895
Test: CTS & local tested
Change-Id: I2f08a4333ac90bb9fdc77cb8f522b415cd694336
2023-03-21 23:49:42 +00:00
Reema Bajwa
63067386d4 Merge "Allow provider filter to be used for query phase" into udc-dev 2023-03-20 21:50:10 +00:00
Reema Bajwa
31f4ad2aaa Allow provider filter to be used for query phase
Test: built locally and CTS tests
Bug: 273310101

Change-Id: Id424501e7ca5a80703384134e649b056d37932d0
2023-03-17 23:35:18 +00:00
Becca Hughes
51d9ad432b Add subtitle to settings (framework)
Allows a credential provider to show a
subtitle/summary underneath the title in
the list of providers.

Test: ondevice & atest & cts
Bug: 253157366
Change-Id: Iae541c050d04412018a4f37f60140454723f7aa4
(cherry picked from commit on googleplex-android-review.googlesource.com host: 4b371e3d82)
Merged-In: Iae541c050d04412018a4f37f60140454723f7aa4
2023-03-17 21:54:01 +00:00
Omer Ozer
73d2da21a6 Merge "Add hash and equals to CredentialDesc" into udc-dev 2023-03-14 18:18:18 +00:00
Omer Ozer
691a8a5258 Add hash and equals to CredentialDesc
Bug: 272649023
Test: manual
Change-Id: Ie2bc999dfa38efdf1539f6b7d8e14cede6aba11d
2023-03-14 17:01:19 +00:00
Helen Qin
100bb91e03 [CredMan] Prefetch credential get api
Based on partner feedback, add a new prefetch get-credential api that
supports first retrieving credential candidates and delaying the UI
flows to finalize a credential to later using a separate api,
GetPendingCredentialResponse.show().

Bug: 273308895
Test: local deployment (will add unit test with the unhiding change)
Change-Id: I212a6066c71b8468c6d7bfc2df2d9dab737368e0
2023-03-13 23:10:24 +00:00
Reema Bajwa
e2a53cbe47 Merge "Remove unused constructor from Entry class" into udc-dev 2023-03-08 05:44:54 +00:00
Reema Bajwa
3cb095ed57 Remove unused constructor from Entry class
This constructor (test api only) is no longer needed and should be cleaned-up. Surfaced in API review.

Test: built locally
Bug: 264717022

Change-Id: I496c159852ddfd874427a1edaa83cf7f69fc8146
2023-03-07 18:35:30 +00:00
Becca Hughes
8d08ee778a Move CredentialProviderInfo for test/settings (framework)
This is a precusor CL to adding a subtitle for settings
to use so we need to move CPI where it can be used
by settings, atest and CTS.

Test: ondevice & atest & cts
Bug: 253157366
Change-Id: I2ffb1f89caf3f2c5bbf7d4dd693ad9a1bbc93fbb
(cherry picked from commit on googleplex-android-review.googlesource.com host: 496d3a3aae)
Merged-In: I2ffb1f89caf3f2c5bbf7d4dd693ad9a1bbc93fbb
2023-03-07 17:14:03 +00:00
Reema Bajwa
fe9247c279 Merge "Add type to builder constructor as it is required" into udc-dev 2023-03-03 18:37:07 +00:00
Reema Bajwa
572d61cf3b Merge "Make RemoteEntry flow independent" into udc-dev 2023-03-03 18:35:03 +00:00
Reema Bajwa
69ffa994b5 Add type to builder constructor as it is required
In a recent change, CreateCredentialRequest constructor was
changed to a Builder and type wasn't added to the builder constructor
even though it is required. This is to rectify that error

Bug: 270978250
Test: CTS unit tests

Change-Id: If0516c6b03a1b5ae464fce9ce5e0209d8eafc5fc
2023-03-03 02:36:49 +00:00
Reema Bajwa
cef4ee6e98 Merge "Set default value of alwaysSendAppInfo to true for CreateCredentialRequest" into udc-dev 2023-02-27 21:48:31 +00:00
Reema Bajwa
6d25688bdc Set default value of alwaysSendAppInfo to true for CreateCredentialRequest
Test: built & deployed locally
Bug: 270995935

Change-Id: I28b5c9309f20248dcbc4297b3ff3930eb4cc16c2
2023-02-27 20:45:44 +00:00
Helen Qin
93b714caf2 CredManUI: support UI cancellation.
The backend can issue an
IntentFactory.createCancelUiIntent(requestToken) call to cancel the UI
matching the corresponding request.

Test: local deployment
Bug: 268708612
Change-Id: I6aef8489cedcbf6cba1901aca1b54ec3e2a3a37d
2023-02-27 05:17:10 +00:00
Reema Bajwa
48c0a642e7 Make RemoteEntry flow independent
Based on API feedback from DP1 testers, we need to make RemoteEntry a standalone feature
irrespective of the type of the credential, or a particular option from the GetCredentialRequest.
With this change, remote entry can be created with just some UI metadata (defined on jetpack side).
When user selects this entry, we send all CredentialOptions to this provider and the entire list can be
serviced on a remote device.
Consequently, this change includes modifying android.service.GetCredentialRequest to take in a list of
CredentialOption's as opposed to a single CredentialOption. When a CredentialEntry is selected, that list
will always contain a single option. When a RemoteEntry is selected, that list may conttain >1 options.
A RemoteEntry is  not tied to a type and hence we need a dedicated type for it that only contains Slice (holding the UI metadata). Earlier we were using a CredentialEntry to represent a remote entry in the get flow. However a CredentialEntry requires a type and hence is not applicable. In the create flow, we were using a CreateEntry which does not require a type but in order to keep the flows symmetric, we decide to use RemoteEntry as a separate entry type in both flows.

Test: built locally & CTS tests
Bug: 270186121

Change-Id: Ibfe76d88bde727cb8eed3227ae0dc26ae7fe6834
2023-02-25 00:32:09 +00:00
Harsh Lal
7c70bad12b Merge "Add Broadcast Receiver for listening to provider updates" into udc-dev 2023-02-24 17:08:23 +00:00
TreeHugger Robot
eda0bf7f8a Merge "Refactor origin to request object for the credential manager privilege APIs" into udc-dev 2023-02-24 03:55:16 +00:00
Omer Ozer
b8bd74f23c Merge "Add equals-hash methods for credesc" into udc-dev 2023-02-23 17:45:06 +00:00
Omer Ozer
72546d9c15 Merge "Type of CredDesc should be written as String8." into udc-dev 2023-02-23 17:42:54 +00:00
Omer Ozer
86140cffb9 Type of CredDesc should be written as String8.
Bug:269841775
Bug:270062247
Bug:270100392
Bug:270099769
Bug:270100007
Bug:270100064
Bug:270100028

Test: Local Unit Test
Change-Id: I515c18302224e99876e1285daaffc2aa42c64d32
2023-02-23 06:26:31 +00:00
Omer Ozer
ae23fac748 Add equals-hash methods for credesc
Bug: 268195935
Test: manual
Merged-In: I30011fe5993990dcd968c94106bd0706a5e8e5fb
Change-Id: I92f39a17333d5005bf8165d75fe417a63d9e0141
2023-02-23 02:12:27 +00:00
Reema Bajwa
9eb577e6cf Refactor origin to request object for the credential manager privilege APIs
Bug: 268534702
DetailedCoverageBugs: 255429881, 255429478
Test: local-deployment

Change-Id: Id40024989f19d3bd806201b0007b301185064b76
2023-02-22 17:20:07 +00:00
Harsh Lal
35bdd08160 Add Broadcast Receiver for listening to provider updates
Bug: 265039677
Test: Local Deployment
Change-Id: Ibef0ff9e36c55e63eb94e4af4dc5984fb78b2bee
2023-02-21 22:27:57 +00:00
Omer Ozer
e750577396 Update creddesc flag method.
Bug: 268143699
Test: manual
Change-Id: I7d42f4f4cb21fdb8c70cd0a084755299f8f45c30
2023-02-18 00:06:17 +00:00
Brad Lassey
29073686b9 Merge "Add Omer and James to CredMan OWNERS file" am: 68fb7a039c am: f48bb6ff62 am: cc48157eea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2442019

Change-Id: Id6bf3bde53673f6a1f34464467cdc908d07e8c2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-17 06:24:18 +00:00
Brad Lassey
1621c5d8a9 Add Omer and James to CredMan OWNERS file
Change-Id: Ie9dd2bc0884ec2d5d6162234717f58aaaf3ddae5
2023-02-16 20:15:17 +00:00
James Willcox
df291234f4 Add some null checks in various credentials classes
Bug: 262614404
Test: other CLs
Change-Id: I366771db613f0d5ba9088f170544c102d28dd3ba
2023-02-15 16:36:02 +00:00
TreeHugger Robot
eef487fa75 Merge "Enforce device policy in credential manager (framework)" 2023-02-15 01:23:54 +00:00
Becca Hughes
d0c0141705 Enforce device policy in credential manager (framework)
Centralizes the provider list generation logic
in CredentialProviderInfo and enforce device
policy. Adds an test API that can be used by
CTS.

Bug: 261978289
Test: ondevice & cts
Change-Id: I4d738351e1e04f39a47428ada9f25516e5e31475
2023-02-14 18:43:31 +00:00
Reema Bajwa
246a8eb3de Address API council review feedback
This change removes a constructor on CreateCredentialRequest, and adds null checks on non-null constructor parameter for CallingAppInfo.

Bug: 268419158
Bug: 268300217

Test: built & deployed locally

Change-Id: If9d7fe9d9bccc21b937f4aec7829548bf00c0fbc
2023-02-13 19:18:30 +00:00
Helen Qin
8507c405f2 Merge "Support authentication entry with locked & unlocked state." 2023-02-09 18:19:24 +00:00
Helen Qin
2922a7e965 Support authentication entry with locked & unlocked state.
Bug: 267814354
Test: manual (see screenshot in comment)
Change-Id: I6ab1664070b5fbde6d252e94c91b7c86878536f6
2023-02-09 15:57:58 +00:00
Harsh Lal
099f584f64 Add privileged APIs with origin
Permission PROVIDE_DEFAULT_ENABLED_SYSTEM_PROVIDER is used in  http://cs/android-internal/frameworks/base/core/java/android/service/credentials/CredentialProviderInfo.java;l=178;rcl=de4db481486429671cc309f0586125ac308ceb23

Bug: 268097161
API-Coverage-Bug: 247549381
Test: local-deployment
Change-Id: I56c4a4fa5b2a01c8c5a2231e2cc4cab34236298d
2023-02-09 00:51:51 +00:00