Commit Graph

90 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Treehugger Robot
ae518d8f14 Merge "Fix change not picking up work profile" into udc-dev am: 3061bcf10a am: f53c4e872d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23138330

Change-Id: I8eb5c88cdfe891a791c8d7db62059060b225f757
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 22:17:04 +00:00
Becca Hughes
fd6a0d786b Merge "If you tap outside dialog then re-enable" into udc-dev am: 90b344e760 am: cb0643a885 am: fce08f688d am: af5ce05bf9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23121656

Change-Id: If9fc21cb1198a3e0a305df89351d908101452a1a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 18:54:43 +00:00
Becca Hughes
68470a4f27 Warn earlier about 5 provider limit
Test: ondevice
Bug: 281616441
Change-Id: I4c4d257e1a0a6396b3948a2b50462bbef1987729
2023-05-10 17:42:21 +00:00
Becca Hughes
347c165521 Fix change not picking up work profile
Test: ondevice
Bug: 281787107
Change-Id: I676384877ce21ae1f1e6972646fc465828013c74
2023-05-10 17:02:02 +00:00
Becca Hughes
56c3b1cddc Merge "Fix provider update bug" into udc-dev am: 5031d67f21 am: 26cc21e52d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23112934

Change-Id: Ic3b80900b91bbda365773387789f12f8c41079b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 22:59:57 +00:00
Becca Hughes
249713a244 Hide enable dialog and prefix pref wrongly enabled am: e513c71189 am: 335c87b924
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23114516

Change-Id: I19ab97192df79f83be2178117dae042260236c34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 22:59:42 +00:00
Becca Hughes
48d406cecc If you tap outside dialog then re-enable
Test: ondevice
Bug: 281696686
Change-Id: I7aee51952b8a905010710a574e0dd39616b2e5d9
2023-05-09 22:48:53 +00:00
Becca Hughes
5031d67f21 Merge "Fix provider update bug" into udc-dev 2023-05-09 21:48:13 +00:00
Becca Hughes
e513c71189 Hide enable dialog and prefix pref wrongly enabled
Test: ondevice
Bug: 281329396
Bug: 280905737
Change-Id: I82652a2520a2f9ca9bc7f8f78cf020bef7af0b15
2023-05-09 21:16:01 +00:00
Becca Hughes
49d11e4995 Fix provider update bug
Test: make
Bug: 280905737
Change-Id: Ia7f33f4c5e1168cadd66119c42bd52e0a80eda10
2023-05-09 20:41:51 +00:00
Guangjie (Jerry) Shi
725d3ae647 Merge "Fix work profile issue" into udc-dev am: ece191b09f am: 1855ff060c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23086871

Change-Id: I324c9c494d23e34423204589993f67a71e97cc95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 11:10:10 +00:00
Becca Hughes
ad13689915 Fix work profile issue
Test: manual
Bug: 281332256
Change-Id: I5f47aacc84e5abe739ecc3bbad474957334e7c91
2023-05-08 23:27:59 +00:00
Guangjie (Jerry) Shi
570bdf7331 Merge "Use correct filter" into udc-dev am: cf440dcae5 am: 9355fbfa8f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23048001

Change-Id: I4ddcaefd09384d27922cafd36bd702d5b46b2525
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-06 04:01:31 +00:00
Guangjie (Jerry) Shi
cf440dcae5 Merge "Use correct filter" into udc-dev 2023-05-06 02:38:26 +00:00
Treehugger Robot
e8873adcce Merge "Set primary services as enabled" into udc-dev am: 1dc52d159d am: b91facbb79
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23047998

Change-Id: Ia4158d64795d0f9060ae2984d3de6fa1b1ff870e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-06 00:15:24 +00:00
Becca Hughes
29e62f898e Fix settings live update am: 481be6dde4 am: eb5c65a43b am: dd4b33d784 am: 5e9b4bf2e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23061769

Change-Id: Icb7383cefd84ed93a31b7e463093f185ee8497f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-06 00:01:25 +00:00
Becca Hughes
ed295c248e Use correct filter
Test: TH
Bug: 280908763
Change-Id: I8a80e8533578b5e0b7a9b516c488b3602d18feef
2023-05-05 23:42:29 +00:00
Treehugger Robot
1dc52d159d Merge "Set primary services as enabled" into udc-dev 2023-05-05 23:40:43 +00:00
Becca Hughes
293e348606 Fix newly installed providers bug am: 17a0266b16 am: a4a355ed92
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23048200

Change-Id: I738543af72a781e78198165f86c18166d68fa5b2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-05 22:01:43 +00:00
Becca Hughes
4fe1f506dd Set primary services as enabled
Test: make
Bug: 281121157
Change-Id: Ide7902d0561fa6e513e90f8245da6a754c856ae7
2023-05-05 21:47:58 +00:00
Becca Hughes
481be6dde4 Fix settings live update
We were using a setting observer to watch
for changes but it was being cleaned up
because we did not hold a reference to
it.

Test: make
Bug: 280905737
Change-Id: I154951f47af20998e25d62a82a8e79f9c00fa027
2023-05-05 20:32:44 +00:00
Becca Hughes
17a0266b16 Fix newly installed providers bug
Package monitor was not registered
properly.

Change-Id: Ifde2e6027b2aee2355114c8ff9b0d1f542fa2f8d
Test: treehugger
Bug: 280867431
2023-05-05 18:27:26 +00:00
Becca Hughes
34e0a12753 Use isPrimary bit to determine top provider am: 3096997718 am: 6464b82525
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22997343

Change-Id: Ib2ca71277a44069e1b0f91ac704374e3056d72de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-05 00:20:25 +00:00
Becca Hughes
3096997718 Use isPrimary bit to determine top provider
If the cred man provider has the isPrimary
bit set then we should use it as top
provider.

Test: ondevice
Bug: 280454916
Change-Id: I8c5651909d3926f09549c64af68185f1ef633198
2023-05-04 21:19:54 +00:00
Guangjie (Jerry) Shi
b3b3342c89 Merge "Modify the usage of setEnabledProvider to temporarily passed in empty list." into udc-dev am: 817ee8489f am: b3b562cd34
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23001498

Change-Id: I8b81873853261b242fc02df9dc48c466b5401295
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-04 18:14:25 +00:00
Jerry Shi
645ba04085 Modify the usage of setEnabledProvider to temporarily passed in empty
list.

Test: local test
Bug: 280492574

Change-Id: Id13aea203636527bcda745727aae417b2a8e289c
2023-05-04 08:57:43 -07:00
Becca Hughes
1c5bfbeafd Merge "Align settings with new mocks" into udc-dev am: 21733fa106 am: 1022918da5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22912923

Change-Id: Ica4092467ac4a290b5f1a5ec0f7c7905e3928755
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-03 17:36:09 +00:00