Commit Graph

133 Commits

Author SHA1 Message Date
Daniel Kim
f000f82ac2 Merge "Replace credential provider placeholder" into main 2024-05-07 17:53:14 +00:00
Daniel
385f5a0c7b Replace credential provider placeholder
Replace credential provider placeholder with the actual credential
autofill provider.

Bug: 330177328
Test: cts
Change-Id: Ib6c9688b3f728706b1f5ac0faa3f042bb6dc447c
2024-04-30 19:45:55 +00:00
Becca Hughes
1c3fb49913 Fix bug where empty section is sometimes shown
There is a bug where the empty section is
sometimes shown for additional providers. This
is because the logic for calculating the
visibility gets the providers and then the
logic for displaying the list gets the providers
and can result in getting out of sync. This aligns
both sets of logic to use the same data.

Test: ondevice & unit
Bug: 330163369
Change-Id: Icf71c78d67d55c929476f8e699d5893e60a49776
2024-04-18 19:52:15 +00:00
Becca Hughes
2fc40e8be7 Make sure policy transparency is applied in all cases
There are some cases where policy transparency is not
correctly showing up (e.g. on the main setting screen
for the primary provider). This makes sure policy
transparency is fully applied to the end user.

Test: manual on device
Bug: 333597574
Change-Id: I8d6a4c60e40bd2e639127777efdb04f1035c24bc
2024-04-11 16:18:54 +00:00
Becca Hughes
fba70edef5 Merge "Add provider name to on/off switch talkback" into main 2024-04-08 21:59:37 +00:00
Becca Hughes
0c14078504 Disable primary provider clickable state
Since this view isn't clickable this was
resulting in incorrect talkback
descriptions.

Bug: 322252309
Test: on device manual
Change-Id: I6b00707dbab9081a5ed09cc2383d06baf0397600
2024-04-08 10:05:06 -07:00
Becca Hughes
cf2d635601 Add provider name to on/off switch talkback
Test: ondevice manual
Bug: 322274544

Change-Id: If067b3bea941ae997d9aefe03286d3b223956326
2024-04-08 16:53:58 +00:00
Becca Hughes
13c6b07868 Pass the package name from the intent to the picker fragment
When an app uses the legacy autofill intent to launch the
settings activity we should pass the package name of the
launching app to the picker. If the app is then picked by
the user we will return result_ok to the app and if it
is not picked we will return result_cancel.

Change-Id: I99dbfad2c69ed57ff891c189f726ecc408d9d188
Test: ondevice manual
Bug: 324197609
2024-04-02 17:53:30 +00:00
Becca Hughes
9931d03f6f Implement policy transparency for CredMan
This CL implements policy transparency for
Credential Manager settings.

Screenshots:
https://hsv.googleplex.com/5502938857340928
https://hsv.googleplex.com/4999933426925568

Test: on device w/ test dpc
Bug: 318552220
Change-Id: I78e1fa47541c81e6e2d2bf2c13159be01928e77c
2024-03-29 09:56:47 -07:00
Manish Singh
3b4e29e68d Merge "Return my user id" into main 2024-03-15 16:55:36 +00:00
Manish Singh
20b7cdcda8 Return my user id
Since the current context is the correct one, we can simply return
myUserId - just like for the managed profile.

Bug: 329784721
Test: manual
Change-Id: Ifbc13b0d87ba7b06c6d04c3442bbac0580c4cf3e
2024-03-15 12:25:51 +00:00
Olivier Nshimiye
baa7a8c2c8 Add enable_private_space_features flag check for Private Space implementation
Bug: 326060689
Test: Manual
Change-Id: I82105714e74789394a3d46b852aaa3e7b93e5877
2024-03-08 15:36:29 +00:00
Manish Singh
55e9f41bda Return true only if the userManager belongs to private profile
The existing code asks the main user's userManager if there's a
private profile belonging to it. If a private profile exists then the
answer to that question will always be true. So, we always end up
showing the apps from the private profile for the personal case.

We should instead ask the userManager if it belongs to the private
profile or not.

Bug: 327598131
Test: manual
Change-Id: I7bc9d58c371341235579d3456b54ea85f598892b
2024-03-04 18:26:58 +00:00
Becca Hughes
62fa76f719 Merge "Hide "additional services" if there is only a single primary services" into main 2024-02-15 23:54:59 +00:00
Becca Hughes
74f8cb6eeb Merge "Update button strings for new design" into main 2024-02-14 20:42:38 +00:00
Becca Hughes
797694855f Update button strings for new design
Updates the positive button strings see
mocks here:

https://screenshot.googleplex.com/6hLciwYTPMsYytt
https://screenshot.googleplex.com/ASAotxvEHnrDodq

Implementation:

https://hsv.googleplex.com/4658122816749568
https://hsv.googleplex.com/5590705238966272

Bug: 322074376
Change-Id: I8488d4b9414448bfbfc9462fe5450681bfbbfbdb
Test: flash device
2024-02-14 18:00:32 +00:00
Becca Hughes
7046a96c9a Merge "Update "none selected" state to align with mocks:" into main 2024-02-13 20:15:18 +00:00
Becca Hughes
c627cdbdba Hide "additional services" if there is only a single primary services
There is a case where there is a single primary service (e.g.
a fresh device) and we should hide additional services in that
case.

Test: unit + manual
Bug: 325077523
Change-Id: I9efb785ac3f7a328fdccd138e585f766d46fa282
2024-02-13 19:06:07 +00:00
Becca Hughes
f368299931 Fix bug where maximum provider limit was not being reflected
The limit of 5 providers had two issues, one it did not
reserve one slot for primary which meant that you could
enable 6 and also even though it wouldn't save and would
show an error when you hit that limit the toggle was not
reset which made it look like it was enabled.

Test: on device + unit
Bug: 324426504
Change-Id: Ibec4efd6394835729869194181161fe8ae743e76
2024-02-12 23:45:35 +00:00
Becca Hughes
6cca4f32e6 Update "none selected" state to align with mocks:
Mocks:
https://screenshot.googleplex.com/BYsmSRcRL5dhjve

Implementation:
https://hsv.googleplex.com/4797150908121088

Change-Id: I47e8f784fa850da4271170d44b3eb770721c3e8b
Test: on device & unit
Bug: 322074376
2024-02-12 23:29:27 +00:00
Becca Hughes
3aa7212b26 Merge "Fix enterprise settings bug" into main 2024-02-06 22:35:07 +00:00
Becca Hughes
401ebcb53d Fix enterprise settings bug
This fixes a bug where the picker
is not using the correct user id
and also ensures that the settings
activity uses the correct user when
launched.

Test: flash & test w/ work profile
Bug 322071206

Change-Id: I846593ff9ae320d9bb774e3e79ed9ef41f101ff5
2024-02-05 10:58:09 -08:00
Becca Hughes
7df4f0f4bd Fix settings flakiness bug
The flakiness was caused by mVisibility
being out of sync and resulting in the
preference being hidden / shown incorrectly.

Test: manual & unit tests
Bug: 322072349
Change-Id: I588da2100b8f2cea38f2bdb63af4e8d19d0efd0b
2024-02-02 22:43:30 +00:00
Becca Hughes
09fa333f47 Add try/catch to handle invalid settings activity
Change-Id: I20d9480fd3bfe14fe4e85ed2937aaba3df09302d
Test: make
Bug: 322287971
2024-01-26 17:51:55 +00:00
Becca Hughes
87117b0183 Merge "Add buttons for new settings design" into main 2024-01-19 22:05:14 +00:00
Becca Hughes
782fcb9bd5 Add buttons for new settings design
This adds a new class called PrimaryProviderPreference
which is responsible for laying out the old cog view if
the feature is disabled and the new button view if it
is enabled.

Screenshots:
https://hsv.googleplex.com/5109836204212224
https://hsv.googleplex.com/5574754636398592
https://hsv.googleplex.com/6737135727017984

Change-Id: I1ad0c59a4afc5be3694b499f66bbd7306dfbee69
Test: Manual test with flag on + off & unit tests
Bug: 300979487
2024-01-19 19:42:14 +00:00
Becca Hughes
2417c84a77 Update strings for new settings design
This updates the strings for the new settings
design as per the new spec.

Screenshots:
https://hsv.googleplex.com/5257279109595136
https://hsv.googleplex.com/5049022822744064
https://hsv.googleplex.com/6177842804031488

Change-Id: I6ff705d2bfab9de4ca2e8d49763b5405e3d2d2c3
Test: Manual test
Bug: 300979487
2024-01-16 18:13:32 +00:00
Becca Hughes
42bcdcfdfd Merge "Make provider icon sizes consistent" into main 2024-01-12 17:23:03 +00:00
Becca Hughes
7dca691308 Make provider icon sizes consistent
Fixes an issue where the icons under "additional providers"
are not the same size. Also, fixes the unit tests for
CredentialManagerPreferenceController.

https://hsv.googleplex.com/4797855484084224

Test: unit tests and manual on device tests
Bug: 278772478
Change-Id: I88d8694189a7529ccc2d92bf1b74bb5bf2268f46
2024-01-12 16:19:47 +00:00
Sunny Shao
076ed573eb Revert^2 "Nullability Annotations replacement"
This reverts commit 19d1d3d15d.

Reason for revert: revert it because this is not the root cause.

bug: 316867690
Change-Id: I0f168dbb64044aa720202af7b1040afd4f028c9c
2024-01-10 07:34:01 +00:00
Sunny Shao
19d1d3d15d Revert "Nullability Annotations replacement"
This reverts commit cf0501e4d7.

Reason for revert: b/317462033, it seems a flaky but revert it first.

Change-Id: Ie1d5e279cca6477fc17d8c27c1ecda8d7a6b2553
2023-12-29 02:28:24 +00:00
sunnyshao
cf0501e4d7 Nullability Annotations replacement
-- Replace the android.annotation.Nullable / android.annotation.NonNull
   with androidx.annotation.Nullable / androidx.annotation.NonNull

Bug: 316867690
Test: build pass
Change-Id: I0c1da55dfb09ece855151c47e0492d6f46538621
2023-12-20 08:50:09 +08:00
Becca Hughes
e70dad42f4 Swap cog and left hand side of row
See bug for more context.

Test: flash device
Bug: 280951040
Change-Id: I21ba2a2177f88dbabea42915727f8c33aa0e23f8
2023-11-28 10:05:38 -08:00
Chaohui Wang
c4a3a50d58 Migrate to CompoundButton
Switch and SwitchCompat are both CompoundButton.

Using CompoundButton in Java will helps migration in the future.

Bug: 306658427
Test: manual - on affected pages
Change-Id: I7cdc2601879a85d33f77239e38263320d5a6984e
2023-10-25 14:57:48 +08:00
Chaohui Wang
82a9a9e47d Remove Settings preference_widget_primary_switch
File content same as SettingsLib's preference_widget_primary_switch

Bug: 285231003
Test: m Settings
Change-Id: I4b9f92435ffb5c253241e294c4680025fe0447fc
2023-10-20 12:55:22 +08:00
Becca Hughes
ccbe3cea6f Merge "Add support for settingsActivity in settings" into main 2023-10-12 19:19:55 +00:00
Becca Hughes
4951641ddb Merge "Fix icon UX bug" into main 2023-10-11 23:50:29 +00:00
Becca Hughes
fa040ab39d Add support for settingsActivity in settings
Adds support for apps to define settingsActivity
in their manifest which will be launched on tap
in CredMan settings.

Test: ondevice manual test
Bug: 300014059
Change-Id: I3c8879fc86cd9b90bed2a301afaa7d5b75e87e3d
2023-10-11 13:40:09 -07:00
Manish Singh
6efc455f2c Show a separate tab for the Private Space
This covers all the known Settings pages using the tabbed view model.

https://docs.google.com/document/d/1CdjUjAE84-5ZEPRIfw5KYFjLVHtEZxc_sF0w95su8DA/edit?resourcekey=0-dAACT9HRexY1IyoxMmkVlw#heading=h.58jd58rmznte

Screenshots:
all apps
https://screenshot.googleplex.com/3E5Jm7Pi2JfN64r
with work tab:
https://screenshot.googleplex.com/8egk4yHK5jSENjR

PS Apps Special media management apps
https://screenshot.googleplex.com/BHHafqW7bgUwSGg
with work tab:
https://screenshot.googleplex.com/3cocdhruEmCCh5k

PS Location Services tab view
https://screenshot.googleplex.com/3DqJcT2BFTEpvYT
with work tab:
https://screenshot.googleplex.com/6Avpx6hxSrdGJw5

PS on screen keyboard tab view
https://screenshot.googleplex.com/4FzVNnBWwbUeJNw
with work tab:
https://screenshot.googleplex.com/8E8UhpWq8PL5nxU

PS password account tab view
https://screenshot.googleplex.com/6bDR4AKtth2S3EW
with work tab:
https://screenshot.googleplex.com/9msXV2TdHdJapch

PS storage tab view
https://screenshot.googleplex.com/5Nk2FTxwdmpEv3B
with work tab:
https://screenshot.googleplex.com/79tw2EaWZKfMsnC

PS appl_languages_work
https://screenshot.googleplex.com/3qrREeg3RQdHhhH

Bug: 302278487
Test: manual
Change-Id: I8cd39170827fbe251bc4075ef306206020b3a022
2023-10-11 12:32:17 +01:00
Becca Hughes
6a57e6d28b Fix icon UX bug
This makes all icons on the page the same size.

Test: ondevice flash
Bug: 302757616
Change-Id: I07c98011a31ae0f168db8c843d48b512d4eb9899
2023-10-10 14:16:13 -07:00
Becca Hughes
0335c2281a Use isPrimary bit when determining settings data change
Test: ondevice
Bug: 300538357
Change-Id: Ic155835761f850358527648a0628b72aab9a2323
2023-09-18 14:00:00 -07:00
Becca Hughes
d0375beae9 Fix crash in settings page (enterprise)
Fixes a crash on the settings page
where the managed user fetcher
will return null.

Test: cts, atest, flash on enterprise device
Bug: 298678607
Change-Id: I8866bad92790f342a8a767b317967b5bf784d865
2023-09-18 13:32:09 -07:00
Becca Hughes
dc5e10e3cc Add a couple of guards to make sure crash doesn't happen
This adds two guards, first checking when the provider
list is generated to stop and flag an warning, second
to have PackageMonitor use a handler so callbacks should
only happen on the thread that the fragment is running
on and if that is no longer available it won't do
anything.

Test: ondevice
Bug: 296164461
Change-Id: Iab03f8a10e667694e2e23da7574831f9ea5c38e2
2023-09-12 19:45:50 +00:00
Becca Hughes
72dc40e42e Only update settings UI if data changes
The flashing was caused by overzealous
reloading which should be fixed by this
CL.

Test: flash device
Bug: 299329723
Change-Id: I7d97da7f3c699ebea280a337bc64b8fe2f351126
2023-09-11 16:44:16 +00:00
Becca Hughes
d7c780aac7 Add missing divider to credman settings
Test: ondevice
Bug: 274126440
Change-Id: I3ba68a749899840c6ed646793e1d65725f10cce8
2023-09-06 10:45:50 -07:00
Becca Hughes
78dc1a5631 Merge "Add extra null checks" into udc-dev am: 598ff21b78 am: dd305f28e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23214089

Change-Id: I8fe8657feaa2a3c0ebb6ff165e21d696c7caa73b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 22:33:34 +00:00
Becca Hughes
400e5491a3 Add extra null checks
Test: ondevice
Bug: 281047738
Change-Id: I07ced78af5da086433aa4288949673161bfe4f20
2023-05-12 16:46:30 +00:00
Becca Hughes
8e9119f5ab Show disable dialog box when none is selected
Also remove from CMPP since that will be
hidden.

Test: ondevice
Bug: 281147573
Merged-In: Ic2b59c42ed4ddbc83a770b8bb99c641d2f1a383d
Change-Id: Ic2b59c42ed4ddbc83a770b8bb99c641d2f1a383d
2023-05-11 02:28:54 +00:00
Becca Hughes
9272c0e3c8 Show disable dialog box when none is selected
Also remove from CMPP since that will be
hidden.

Test: ondevice
Bug: 281147573
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:16d3b54aaf802c66be439bf65c877cba60c4390d)
Merged-In: Ic2b59c42ed4ddbc83a770b8bb99c641d2f1a383d
Change-Id: Ic2b59c42ed4ddbc83a770b8bb99c641d2f1a383d
2023-05-10 23:41:56 +00:00
Treehugger Robot
8a36c107a9 Merge changes I4c4d257e,I4cc4cc22 into udc-dev am: f6eab0c9de am: 5e8e9ace78
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23121657

Change-Id: If411aa4ef2cc867e14a4838c7e3c96c568c70885
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 22:19:54 +00:00