Commit Graph

357 Commits

Author SHA1 Message Date
Marcelo Arteiro
8577c10535 Migrate materialColor* attributes into colors
The new color were already introduces in a previous CL ag/30322786

This CL is about replacing the attribute usage by the new color resources, which should work the same but cannot be overwritten, or styled, guaranteeing consistency across the OS.

The old attributes will be removed in CL: ag/29910036

Bug: 374273611
Test: presubmit
Flag: EXEMPT Un-flaggable refactor of private color resources
Change-Id: I05b5261054bcb6de40e4e40d633025495f3dd01f
2024-12-06 16:55:33 +00:00
Shraddha Basantwani
32e388ad31 [SPA] Add biometric authentication for package modification
Add an extra step of Lock Screen for disabling, force-stopping or
uninstalling updates for protected packages

UI Change Details : https://drive.google.com/drive/folders/1w7gKTmCxQ_j-9GQnIpEfF5_gmQ27b8l_?resourcekey=0-brLdN8VfqVPGm2FMwfrmkQ&usp=drive_link
Bug: 352504490, 344865740
Test: atest AppButtonsPreferenceControllerTest PackageInfoPresenterTest
Flag: EXEMPT High Security Bug
Change-Id: I0c494e307b02229d751de118abcc89e4e61a6861
2024-12-02 09:36:05 +00:00
Diya Bera
1bad4e27c1 Identity Check API
Update MANDATORY_BIOMETRICS constant to IDENTITY_CHECK

Flag: android.hardware.biometrics.Flags.FLAG_IDENTITY_CHECK_API
Bug: 373424727
Test: N/A

Change-Id: I6413e3695d1e07dcc225230f8fd2d373b1879e8f
2024-10-25 01:20:22 +00:00
Chaohui Wang
fa5b1a2329 Not log error when isPackageEnabled = false
Which is expected when package is not installed or not enabled.

Bug: 369427597
Flag: EXEMPT log only
Test: manual - on sub pages of Settings
Change-Id: Ic8bcf0df8b91d50215be2df8eba20eb447258d1e
2024-10-11 07:52:55 +00:00
Diya Bera
aa322bc4f7 Avoid using MANDATORY_BIOMETRICS bit if flag is not enabled
Flag: android.hardware.biometrics.flags.mandatory_biometrics
Bug: 370757426
Test: N/A
Change-Id: I4e2a72a80f68579d60466e859370b6fd93a8cd23
2024-10-04 14:10:24 +00:00
Diya Bera
1c604f29ef (2/N) Biometric error dialog
Add an error dialog to help user recover from biometric error for
for identity check while trying to factory reset

Flag: android.hardware.biometrics.flag.mandatory_biometrics
Bug: 358641110
Bug: 358179610
Test: atest MainClearTest
Change-Id: Ia20389a3146aa45ad42bdc4d31f1bd9488f2dc42
2024-09-17 20:21:48 +00:00
Diya Bera
b8ab650afe Add mandatory biometric for exported enroll intents
Flag: android.hardware.biometrics.flags.mandatory_biometrics
Fixes: 358173662
Test: N/A
Change-Id: Ic67d42ba84220f4c18cf445ae75d4f7f8dfd1f39
2024-08-27 14:10:17 +00:00
Diya Bera
92ea474b86 Add mandatory biometric prompt to platform surfaces (5/N)
1. For biometric settings, request biometric prompt only after
   successful credential verification and no auth request after
   enrollment

2. Differentiate between mandatory biometrics ineffective error and
   other biometric errors

Flag: android.hardware.biometrics.flags.mandatory_biometrics
Bug: 358176202
Bug: 358179610
Test: atest UtilsTest DevelopmentSettingsDashboardFragmentTest MainClearTest BuildNumberPreferenceControllerTest CombinedBiometricProfileSettingsTest
Change-Id: I778dd5403dd5ab64d8cc39bd88b22c4d39182e94
2024-08-13 04:21:37 +00:00
Diya Bera
31ec11f0b6 Hide background when identity check auth is requested
Flag: android.hardware.biometrics.flags.mandatory_biometrics
Fixes: 354014097
Test: atest UtilsTest
Change-Id: I3af06fd9dca2bdc306496f1db832e1d1e2bfe8d2
2024-07-25 17:00:05 +00:00
Diya Bera
9bae71c15c Add mandatory biometric prompt to platform surfaces (3/N)
Pass user ids for identity check. This is to make sure that the right
user is requested auth for different profiles.

Flag: android.hardware.biometrics.Flags.MANDATORY_BIOMETRICS
Bug: 339910718
Test: atest UtilsTest
Change-Id: I953b56e9bfd1edd49d080124905d42a23247b7a7
2024-07-23 04:07:08 +00:00
Sunny Shao
79c69fccd1 Fix display problem in the freeform mode
Fixes: 347373574
Flag: EXEMPT bugfix
Test: manual test
Change-Id: Ia1333474059988a524fc0ca49e7062b51da2cc37
2024-07-05 15:41:57 +08:00
Diya Bera
049de84f2d Add mandatory biometric prompt to platform surfaces (1/N)
1. Face settings
2. Fingerprint settings
3. Change device credential

Flag: android.hardware.biometrics.Flags.MANDATORY_BIOMETRICS
Bug: 339910718
Test: atest UtilsTest

Change-Id: I69778d1733ea9fb312e7c26ae0fa23b6008dde5d
2024-07-01 21:35:19 +00:00
Jigar Thakkar
b48a4469ac Hide private space settings app post setup
Currently, the changes to disable private space settings app component
are located in SettiingsInitialize.java. These get triggered when
ACTION_USER_INITIALIZE is received by the settings app inside the
private profile user. However, we are stopping the private profile user
at the end of the setup flow. This can lead to a scenario wherein
ACTION_USER_INITIALIZE is relayed by the system server but not received
by the private space settings app, since it was stopped. To over come
this issue, we move the changes to disable the private space settings
app component inside the private space setup flow (right after the user
is created and started).

Bug: 342165140
Test: atest PrivateSpaceMaintainerTest#createPrivateSpace_psDoesNotExist_setsPrivateSpaceSettingsComponentDisabled
Flag: ACONFIG android.multiuser.enable_private_space_features NEXTFOOD
Change-Id: Ib9baac1e9d835ea5a27c15d499e10615b84cf97b
2024-06-05 10:11:33 +00:00
josephpv
c5611bfbc1 Face and fingerprint unlock strings for private space
Recordings:
b/326399895#comment10

Bug: 326399895
Test: Manual
Change-Id: I9f4449439639c93a10475333a91059f855bce07b
2024-05-24 05:00:44 +00:00
Sunny Shao
975ce0ec6c Fix the display problem of the cutout
- Add the WindowInsetsCompat.Type.displayCutout.

Fixes: 332514800
Test: atest com.android.settings.UtilsTest SettingsActivityTest
Change-Id: Ieb4ffb5a18c0babe3dd1c6f3482e8585899237f0
2024-05-08 16:07:29 +08:00
josephpv
1791ce216b Support face unlock for PS if class2 biometric and above
With this change it is checked if face unlock is supported as a class2
or class3 biometrics on the device.
If face is convenience biometrics then face unlock for
private space controller is not added.

Bug: 329044103
Test: atest UtilsTest and verified Face unlock is not added if face is convenience
Change-Id: I6e1a6557774be1173ad3ee7ff7b14d51f9fe1716
2024-04-03 19:09:40 +00:00
Treehugger Robot
b9c1632a5f Merge "Fix the action bar shows up problem" into main 2024-04-01 09:29:28 +00:00
Jason Chiu
0b61e93459 Merge "[Safer intents] Connectivity" into main 2024-03-29 01:11:06 +00:00
Sunny Shao
8803ae7823 Fix the action bar shows up problem
- Hide the internal action bar.
- Refine the Utils.setupEdgeToEdge API.
- Rollback the testcases.

Bug: 328622648
Fixes: 331308440
Test: atest com.android.settings.UtilsTest SettingsActivityTest
Change-Id: I7dfbc93def3e772b57bf06b8276315cee7402a9c
2024-03-29 08:32:22 +08:00
Sunny Shao
eea96db6da Fix the keyboard shows up problem
- Fix the keyboard shows overlapped problem in ChooseLockPassword.

Fixes: 331179831
Test: atest PlatformScenarioTests:LockscreenWithSixDigitPIN
Change-Id: Id57a3d1d693fb12d370fbf7e8e95b6da5dbf7df3
2024-03-28 13:09:38 +08:00
Jason Chiu
c53a73ef70 [Safer intents] Connectivity
To avoid implicit intents, make intents launch explicitly.

Bug: 323061508
Test: build
Change-Id: I44ff8a789d933f11ba7e68e52055575245276224
2024-03-26 16:44:48 +08:00
Sunny Shao
8d4ba6d904 Use the correct Edge to Edge flag
- Use the correct flag to fix the navigation bar problem.

Fixes: 330217912
Test: manual test
Change-Id: I37869d5cc713be2b03bc8e9206ff1e0dcee8512e
2024-03-25 09:19:11 +08:00
Sunny Shao
458ed92600 Handle the Edge to Edge problem
- Fix the navigation bar overlapped problem in sub-pages.
- Use a workaround solution to handle Homepage statusbar problem.

Bug: 328622648
Fixes: 330217912
Test: manual test
Change-Id: I67a65e2af10def84bf743d4d3cd0047098423ffe
2024-03-21 19:04:58 +08:00
Manish Singh
acafaf94b9 Merge "Support private profile in spinner adapters" into main 2024-03-19 09:54:58 +00:00
Manish Singh
d7ff6fe966 Support private profile in spinner adapters
Screenshot - https://screenshot.googleplex.com/35czwQHeevX75pj
Video - https://drive.google.com/file/d/1LkYPJ3i8llArnQBE3ieLPYMctEOw3xdp/view?usp=sharing&resourcekey=0-j-3-VV4OyXJKBPXwAqJvKg

Bug: 328565911
Bug: 313610609
Bug: 302082696
Test: manual
Test: atest UserAdapterTest
Test: atest StylusDevicesControllerTest
Change-Id: If8395eba5cc73809ab4abc95bc13067451c38b8f
2024-03-15 17:16:57 +00:00
Marcus Ge
3042a3f02b Merge "Update Settings homepage color role mappings" into main 2024-03-12 20:56:49 +00:00
Olivier Nshimiye
0f3799cbad Add an additional flag guard for Private Space implementation
This a layer of flag guarding only for the implementation of Private Space features excluding the APIs. The MVP flag allow_private_profile still guards all the features including the APIs.

Bug: 326060689
Test: Manual - a few verifications that some feeatures are unavailable when this flag is disabled
Test: Run presubmits and verify that nothing breaks
Change-Id: I05f7e2f20c6132b33484bb133ce03a933ece485f
2024-03-04 15:43:24 +00:00
josephpv
ec273aca12 Remove private space biometrics on switching to device lock
Bug: 320685466
Test: Verified manually
Change-Id: I5fe850ada9ae53bb1a00ed171beb6f8e099fbc0d
2024-01-23 15:24:55 +00:00
Manish Singh
71e27963f7 Merge "Check purely for the presence of a managed profile" into main 2023-11-30 20:51:06 +00:00
Manish Singh
d503f25692 Check purely for the presence of a managed profile
including the parent user, as here we care only about the existence of
the managed profile.

This maintains the behaviour prior to private space changes.

Bug: 313128792
Test: manual
Test: atest ProfileSelectFragmentTest
Change-Id: I1d253f95ca534b48acfdb4c1c8b84368d731dded
2023-11-28 16:09:11 +00:00
Olivier Nshimiye
02399366cd Merge "Update the getHideInSettingsInQuietMode to getHideInUiInQuietMode" into main 2023-11-23 15:53:28 +00:00
Olivier Nshimiye
fcafdcffb0 Update the getHideInSettingsInQuietMode to getHideInUiInQuietMode
Bug: 307515481
Test: manual
Change-Id: I75996df11e9276eff5c388b509d630a0d4b3d39f
2023-11-21 10:27:48 +00:00
Chaohui Wang
3534061f7b New SystemUpdateRepository
Extract getSystemUpdateIntent, and add unit test.

Bug: 311110616
Test: manual - on "Software updates" page
Test: unit test
Change-Id: Ic7c06490d1d324705f547b2394794605e85485a4
2023-11-21 14:09:57 +08:00
Manish Singh
779cda70d9 Check all users if anyone needs a new tab
Earlier we were making decision based on the first user that has the
SHOW_IN_SETTINGS_SEPARATE property. A later user could require a new tab
as well.

Bug: 309605138
Test: manual
Change-Id: Ib4fd88d31153974dfad07c0b815ef011b11d1567
2023-11-07 15:01:37 +00: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
marcusge
775280aa27 Update Settings homepage color role mappings
doc: go/settings-color-roles-remapping-result
Test: local raven device
Bug: 299907492

Change-Id: I8ba90ec61970fa2aa56f9d5d4029c22c74940120
2023-10-05 17:09:02 +00:00
Richard MacGregor
f367a90499 Merge "Cleanup permissions hub flags" into main 2023-08-31 17:53:01 +00:00
Aleksandr Lukin
344a4da39f Merge "Update the API usage to get total size of devices" into udc-qpr-dev am: 1bc145ab6b am: 595db29382
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24434307

Change-Id: I276e74bc1534ec9253b886ceaf29dc5710a011fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-23 14:46:55 +00:00
Edgar Wang
2d57d002ae Update the API usage to get total size of devices
StorageStatsManager fixed in StorageStatsService#getTotalBytes
So that we should change back to call the API.

Bug: 295358118
Bug: 288103116
Test: verified manually
Change-Id: I3dcc9698403612f961cf0de41925dcbcb43e260b
2023-08-22 11:26:57 +00:00
Oli Thompson
111b073ca9 Add show emergency button call to biometric prompt
useDefaultSubtitle has to be set explicitly from promptInfo rather than being assumed true

remove subtext for managed profile challenge screen to create space for emergency call button

Test: manually tested
Bug: 286391641
Bug: 286422726
Change-Id: I848e00dcd0013124e59ef711c3615e6773c3d210
2023-08-15 16:52:36 +00:00
Richard MacGregor
cfe4bf06ff Cleanup permissions hub flags
Remove unused flag

Bug: 290990618
Test: manual
Change-Id: I766099443117db1f07e888be70af6e00212a8125
2023-08-08 09:57:21 -07:00
Wenhui Yang
cf8ba456bb Add bp subtitle for WiFi sharing
Move the screen lock message selection logic to Utils and update the
related strings as suzannechen@ suggested.

Test: manual (see bug)
Test: atest UtilsTest
Fixes: 291307701
Change-Id: I346c25426395eea1320edc07ce2d962efeb8daa6
2023-08-01 21:11:33 +00:00
Edgar Wang
e52320e755 Correct used size of Storage Settings.
Since StorageManager rounded the totalBytes of device storage but
they don't do that rounding for freeBytes.
So in some cases the freeBytes can be greater than totalBytes.

We propose to get totalBytes of device storage directly to calculate
correct privateUsedBytes.

Test: robotest
Bug: 281955532
Change-Id: I4f137c20e7c2f54f4e037d50e81b3176edc1a83a
2023-06-27 06:29:00 +00:00
Rhed Jao
b7a4a7daa4 [Settings] Add a verification flow for exiting repair mode
Handles the ACTION_CONFIRM_REPAIR_MODE_DEVICE_CREDENTIAL
intent to launch the confirm device credential activity for
users to exiting repair mode. The activity passes a special
user id USER_REPAIR_MODE to the framework and verify credentials
that the user enrolled in normal mode.

Bug: 277561275
Test: am start -a android.app.action.PREPARE_REPAIR_MODE_DEVICE_CREDENTIAL
      settings put global repair_mode_active 1
      am start -a android.app.action.CONFIRM_REPAIR_MODE_DEVICE_CREDENTIAL
      The credential is verified successfully.
Change-Id: I9ffe32f9925ee2b990c49d5674d27196a4c9edf7
2023-06-15 02:14:41 +00:00
Treehugger Robot
a7152b9573 Merge "Align Settings and SystemUI packageName references" am: 1452f7dd3a am: ff6def3c7c am: 525b567db3
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2530819

Change-Id: Ic9c46e521d8ae7b85dc63fa593e5f05951f596a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 10:51:42 +00:00
Treehugger Robot
525b567db3 Merge "Align Settings and SystemUI packageName references" am: 1452f7dd3a am: ff6def3c7c
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2530819

Change-Id: I4dfc995e7185c5cb7a599156d71a198bd434cb74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 10:18:17 +00:00
Shen Lin
57b03b309d Align Settings and SystemUI packageName references
This CL migrated both Settings and SystemUI packageName into Utils.java
to align references.

Bug: 277651621
Test: m Settings -j128
Change-Id: I3d6808de76120a2ddbbed4980b8a65cec81502c9
2023-04-11 10:27:04 +00:00
Chaohui Wang
c688f93ed9 Display App installed in other user in All Apps
Only for admin user.

Also clean up unused getInstallationStatus().

Fix: 277299765
Test: Manually with All Apps when multiple users is on
Test: Unit test
Change-Id: I4de681c101a605e3517dcd8765bf7a95d1b76417
2023-04-10 03:06:01 +08:00
Will Leshner
3358e2a0a1 Restrict screen saver settings searches to enabled users.
If a user can't enable screen saver, they shouldn't be able to
accidentally find screen saver related settings in Settings.

Bug: 260276394
Test: atest ScreenSaverPreferenceControllerTest
Test: manually by settings up a second user on a device that supports
screen saver, switching to that user, and making sure that searches for
"screen saver" don't accidentally reveal settings that can't be
accessed.

Merged-In: If2f465b2acb548455f0868507cf47217ea1a626f
Change-Id: I96fb8f9c6c4960f203b51bb43994f7bafdcefdf5
2023-02-27 10:20:05 -08:00
Will Leshner
ca1379f0b3 Restrict screen saver settings searches to enabled users.
If a user can't enable screen saver, they shouldn't be able to
accidentally find screen saver related settings in Settings.

Bug: 260276394
Test: atest ScreenSaverPreferenceControllerTest
Test: manually by settings up a second user on a device that supports
screen saver, switching to that user, and making sure that searches for
"screen saver" don't accidentally reveal settings that can't be
accessed.

Change-Id: If2f465b2acb548455f0868507cf47217ea1a626f
2023-02-24 15:36:48 -08:00