Commit Graph

345 Commits

Author SHA1 Message Date
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
Tsung-Mao Fang
4175f40fca Check current user owns a frp credential
In Android U+ tablet device, Android introduces headless mode which
running on a main user instead of system user. Therefore, device throw
a security error in HSUM build now.

For now, we check whether current user owns a frp
credential instead. This way also works on non HSUM build.

Test: robo test + run FRP mode in Suw flow.
Fix: 262438904
Change-Id: Ie4c7c470b13b9de8d532e61e9984521cebe7adff
2023-02-08 13:27:32 +08:00
Victor Truong
f3c9a09cac Replace SystemUser checks with MainUser.
Bug: 257333623
Test: atest CommunalPreferenceControllerTest, atest UtilsTest, atest
TimeoutToDockUserPreferenceControllerTest

Change-Id: I5d2a818f9f35968ced1db7f9fa4b79432a502023
2023-02-01 15:16:48 -05:00
Himanshu Gupta
1648d68d49 Adding "Delete all App Clones" option on Cloned Apps page.
This option is seen by clicking the '3-dot' menu on Settings->Cloned Apps page and requires:
1. Flag 'remove_all_cloned_apps' to be turned on.
2. Cloned UserId to be present in system.

Test: Manually setting the flag, creating clones.
Change-Id: I83ff40923f7932ed6b23cb831bdcd2cb9252d295
2022-12-23 10:58:54 +00:00
“Ankita
d3019d3ee0 AppClone: Changes to display app list on Cloned Apps page.
- Filers app list
- Displays preference summary
- Display two-target view
- Display header text
- Metric for cloned app page
- Adds bridge class
- Disable "Show system" option

Bug: 259021576
Bug: 249916469
Test: make RunSettingsRoboTests -j64
Change-Id: Idcf213325ead9e298eb3e958b286adcd4c06c8d5
2022-11-28 11:58:19 +00:00
“Ankita
d3ea0f098e AppClone: Add new tab only if any user handle has the property set.
This will ensure that a new tab is not created for clone profile. The
existing behavior of creating work tab when managed profile is present
on device remains as-is.

Bug: 248204976
Test: manual (verfied with primary, clone and managed profile present on
device at the same time)
Test: make RunSettingsRoboTests -j

Change-Id: I116a0de69c51e90aa59fdb47e904c567e5d62102
2022-11-10 10:05:44 +00:00
Chaohui Wang
33033fe755 Add InstantAppDomainsPreference for Spa
To try:
1. adb shell am start -n com.android.settings/.spa.SpaActivity
2. Go to Apps -> All apps -> [One Instant App] -> Supported links

Bug: 236346018
Test: Unit test
Test: Manually with Settings App
Change-Id: I344ddb9c2f3dbc47d38554bf45f04ca7c26c0e5f
2022-11-03 16:27:42 +08:00
Chaohui Wang
601124517a Add AppInstallerInfoPreference for Spa
This is used in new App Info page.

To try:
1. adb shell am start -n com.android.settings/.spa.SpaActivity
2. Go to Apps -> All apps -> [One App] -> App details

Bug: 236346018
Test: Unit test
Change-Id: Ibd1ae27c60a096b7f12ca6640a58b099dcfb0b6b
2022-10-27 20:19:17 +08:00
TreeHugger Robot
a5470e4c24 Merge "Fix Settings getProfileIdsWithDisabled usage" 2022-05-06 03:16:37 +00:00
Adam Bookatz
8311f68065 Fix Settings getProfileIdsWithDisabled usage
In two places, Settings uses getProfileIdsWithDisabled intending to
restrict itself to *managed* profiles, but actually allows for any type
of profile.

Since the declared intent is to only deal with managed profiles, we
update the code to only consider managed profiles.

On devices that only have managed profiles (currently almost all
devices), this cl is a no-op.

Bug: 230495929
Bug: 230534572
Bug: 170249807
Test: com.android.settings.UtilsTest
Test: make RunSettingsRoboTests -j
Change-Id: Id04d45839ef61080b00ca2f91525718cb3a85120
2022-04-27 18:34:07 -07:00
Jason Chiu
880471a1b0 Renew the highlight state color
Fix: 230283855
Test: visual
Change-Id: I725422518d07a0b0676731bd9da8384ab149ab1b
2022-04-25 15:34:42 +08:00
Zoey Chen
c0ff08c398 [Provider Model] Internal cleanup - remove Provider Model flag and deprecated legacy UI part.4 am: ad79a1819f am: c4d1fc4fd2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16475177

Change-Id: I759453090ac063dc4d8c79c1a18bcfb2cd861871
2021-12-15 14:15:12 +00:00
Zoey Chen
ad79a1819f [Provider Model] Internal cleanup - remove Provider Model flag and deprecated legacy UI part.4
Test: atest NetworkDashboardFragmentTest
Bug: 197066557
Change-Id: I9781af3a53fe7050b414f0574abb7618f8d71707
2021-12-15 10:19:49 +00:00