Commit Graph

316 Commits

Author SHA1 Message Date
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
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
Jason Chiu
e65d3ab1cc Revert "Revert "Support highlightable Settings homepage menu for 2-pane"" am: 29a09e55ba am: 235353a131
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16038013

Change-Id: I4c526a0854fbe64efb834bf993c1e461b7993cad
2021-10-12 11:12:26 +00:00
Jason Chiu
29a09e55ba Revert "Revert "Support highlightable Settings homepage menu for 2-pane""
This reverts commit 096c090b80.

Reason for revert: crash is fixed in this change

Bug: 202510128
Test: manual, build
Change-Id: Ifff8d58cfdcf43e123b11dee308665b2617cb4b3
2021-10-12 09:32:07 +00:00
Greg Kaiser
d659a5271b Merge "Revert "Support highlightable Settings homepage menu for 2-pane"" into sc-v2-dev am: 1ab7ad3e40 am: 3f638ebad8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16017469

Change-Id: I8a3deba2be06113f781f399221a8463f5454ceee
2021-10-08 15:12:13 +00:00
Greg Kaiser
096c090b80 Revert "Support highlightable Settings homepage menu for 2-pane"
This reverts commit 9037ceabd3.

Reason for revert: Presumed cause of b/202510128

Change-Id: I0daaab95d9bc57229c0c8c916cbe3ada7aafb6fa
2021-10-08 14:29:06 +00:00
Jason Chiu
630cbdc519 Merge "Support highlightable Settings homepage menu for 2-pane" into sc-v2-dev am: 9b1f593773 am: de33f1224b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15785736

Change-Id: Ic375f9e19b1f6dbc6f70cedaa770c133fb96f652
2021-10-08 08:12:37 +00:00
Jason Chiu
9037ceabd3 Support highlightable Settings homepage menu for 2-pane
1. Add a preference group adapter to perform highlighting
2. Add a class for mapping highlighable menu keys and preference keys
3. Add an API to determine if the screen is in split mode

Bug: 199017944
Test: manual, build
Change-Id: I8e3fe5fb96480a31ee0f3b3afb6ad78999d3d2bc
2021-10-08 12:52:52 +08:00
Adam Bookatz
30dafd4140 UM.getUserHandle -> UM.getProcessUserId
UM is being made @UserHandleAware, so using an explicit method avoids ambiguity.

Bug: 201679968

Test: (No-op) compiles and treehugger
Change-Id: If067af7ced5017a9689cafbf99ceec1d26c06b3b
2021-10-05 12:55:22 -07:00
menghanli
a1674787fe Fix a11y service icons are tiny after changing display size to "Largest"
Root cause: Scaled down non vector drawable to to avoid crashing Settings
Solution: Enlarge the maxWidth & maxHeight from 500 to 600

Bug: 195975294
Test: manual test
Change-Id: I9d771cfaa7cf3eed37265219c082b6337fa5c063
2021-08-31 09:38:31 +08:00
Jason Chiu
c38978f3e1 Guard against the exceptions when launching a non-existing fragment
Test: robotest
Bug: 190371550
Change-Id: I2bb7d4bdb23756634526db7e272563a1587c9640
2021-06-30 18:33:59 +08:00
Yi-Ling Chuang
2a5553707e Revert transition codes from the base activity
Bug: 191335572
Test: robotest
Change-Id: Iaf0c3086586affb091f38097df19e68b7e49e19a
2021-06-22 17:37:37 +08:00
Jason Chiu
132cc2127b Merge "Revise homepage colors" into sc-dev 2021-06-03 03:31:06 +00:00
Jason Chiu
263d1e2c82 Revise homepage colors
- Increase the contrast ratio of the search bar
- Adjust the color of IA icons

Test: visual
Fixes: 179632631
Change-Id: I9b4fc4d671183929d4b2fed27cba8600d56cc74c
2021-06-02 13:24:33 +00:00
Yanting Yang
1aadccac6d Remove silky flag from misc files
Remove the silky condition.

Bug: 183670633
Test: robotests
Change-Id: I53cff0b149afb26d40f9b3af21c1b384058b306b
2021-06-02 19:11:12 +08:00
Rajeev Kumar
265dd55235 Merge "Ensure hibernation exemption toggle uses pre-S flag" into sc-dev 2021-05-26 16:46:58 +00:00
Kevin Han
4b34271f7d Ensure hibernation exemption toggle uses pre-S flag
For dogfood, we want hibernation to target apps that target pre-S. This
was done on the PermissionController side but the toggle in Settings
did not visually reflect this policy, confusing dogfood/teamfood
participants.

This updates the default toggle position to consider whether the pre-S
flag is on and then default to the "on" position for apps targeting
pre-S if the flag was on for the device.

Bug: 189260947
Test: atest HibernationSwitchPreferenceControllerTest
Test: manual
Change-Id: I9cd16e82e1eee4589cb17a356b6bf2e3297a8dd2
2021-05-25 18:52:19 -07:00
Jason Chiu
7d9dceadb7 Redesign homepage IA icon
- remove the outer circle of the icons
- tint the icons including injected ones

Test: robotest, visual
Bug: 182870640
Change-Id: If72c37152f4f0d68e25149b11d497eef1c7ece91
2021-05-12 08:37:37 +00:00
Arc Wang
543068210f Implements profile selection tab in Storage Settings
- StorageDashboardFragment and StorageItemPreferenceController works only
  for one profile per instance.
- StorageAsyncLoader loads for all users(profiles) and regards each user independent.
- SecondaryUserController will not load personal profile user in work profile tab.
- Cleanup some unused profile related files.

Bug: 174964885
Test: atest com.android.settings.deviceinfo
      atest com.android.settings.deviceinfo.storage
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo.storage
Change-Id: I8361c29bc240c519c7261b19522c41439479c1c2
Merged-In: I8361c29bc240c519c7261b19522c41439479c1c2
2021-05-11 20:00:08 +08:00
Curtis Belmonte
1e1b259445 Revert "Turn on the transition flag"
This reverts commit 1be773da62.

Reason for revert: b/187517936

Fixes: 187517936
Change-Id: I57d0a7a16bdb76e105b0febd43bdf81521e69e3a
2021-05-07 22:43:05 +00:00
Yi-Ling Chuang
1be773da62 Turn on the transition flag
Test: robotests
Bug: 186701900
Change-Id: I09c821e17fca88ee532f6535031a52c4c832a1e8
2021-05-07 13:21:42 +08:00
Yi-Ling Chuang
58813f7b6c Apply settings page transition
This change applies Shared X-Axis transition across settings pages. For
injected settings, the injected apps have to also apply the same
transition to take effect.

Fixes: 177479937
Test: robotests and navigate through settings pages
Change-Id: I6241860766f5969428faf9a5b3730a7614fdcd92
2021-04-28 17:29:49 +08:00
jasonwshsu
9b284a9af1 Wrap a white adaptive background if it is not an AdaptiveIcon
Bug: 183501919
Test: manual test
Change-Id: I6a899aa0fcb724d5318274190f359080fc2d0615
2021-04-26 05:01:00 +00:00
Mill Chen
7edebeef7e Combined biometric settings implementation
There will be multiple biometrics authentications existing at the same
time, so we added a new page for multiple biometrics to control
biometrics settings.

Bug: 183449119
Test: manual test
Change-Id: I359082caf771e07dfd5b24973cb8a3cf372c1b30
2021-04-23 15:18:08 +08:00
Chiachang Wang
003e27d146 Remove hidden connectivity methods access
This commit resolves the hidden methods accesses for
LinkProperties, IpConfiguration and RouteInfo with atlernative
way for the connectivity mainline module preparation.

Bug: 172183305
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
com.android.settings.wifi.details2.WifiDetailPreferenceController2Test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
com.android.settings.wifi.details.WifiDetailPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
com.android.settings.UtilsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
com.android.settings.wifi.WifiConfigController2Test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
com.android.settings.wifi.WifiConfigController2Test

Change-Id: Iec4dab5d9fa12dedcf69a1cfe2a8be0956bc0d79
2021-03-18 14:31:28 +00:00
Zhen Zhang
48bd52e091 Update settings for app hibernation
Created an preference in Apps & Notifcations page as the entry point for
apps that are hibernated. Also added a switch preference in AppInfo page
for users to exempt an app from hibernation.

Bug: 181172051
Test: HibernatedAppsPreferenceControllerTest;
HibernationSwitchPreferenceControllerTest;
AppInfoDashboardFragmentTest

Change-Id: I72a90ab391cd521150fc155a6d9c67c846b7360d
2021-03-15 21:34:46 -07:00
Wei Wang
a6daf85a32 Add a flag for controlling location indicator settings.
Bug: 177334097
Test: Manual && make RunSettingsRoboTests ROBOTEST_FILTER=LocationIndicatorsPreferenceControllerTest
Change-Id: I33821ab8328fd18b796a78813b7354a928832792
2021-01-12 16:02:57 -08:00
SongFerngWang
a97b4faa67 The helper for slice of carrier and non-Carrier, used by ProviderModelSlice.
create a helper file.
create a res/drawable/ic_signal_strength_zero_bar_no_internet.xml
create string at res/values/strings.xml

Bug: 173971144
Test: atest ProviderModelSliceHelperTest
Change-Id: I7f63a6b04784325989e776cb140017314ebde4ce
2020-12-22 21:50:40 +08:00
Wei Wang
edbe2cca13 Add a developer option to enable / disable location indicators.
Also bundled location related developer options into the location
category.

Bug:175357420

Test: Manual && make RunSettingsRoboTests ROBOTEST_FILTER=LocationScanningPreferenceControllerTest

Change-Id: Ic33ad6e70d258c9afc2cefba70ab6e7b2bafd16a
2020-12-13 21:33:56 -08:00
Zoey Chen
3abe48ef38 [Provider Model] Add new API to detect
1. current connection is mobile data
 - remove the SubscriptionsPreferenceController#activeNetworkIsCellular() and move into MobileNetworkUtils
2. isProviderModel API
 - Add it in Util for Provider Model
3. isWiFiCallingEnabled
 - remove WifiCallingPreferenceController#isWifiCallingEnabled() and move into MobileNetworkUtils
4. Add nes test case for MobileNetworkUtils

Bug: 171873895
Test: atest -c MobileNetworkUtilsTest
Change-Id: I4bfdf0537fe07d064d6c0ba4a2c44b4a4f158d91
2020-11-13 18:01:10 +08:00
Mill Chen
ad99e2ef38 Update related UI if battery is not present
This change is to update the related UI in the battery page if the
battery is not present. This includes the following updates:
1. Update the summary of battery tile in the Settings homepage
2. Replace the battery level with "Unknown"
3. Replace the summary with help message in the battery page
4. Remove the battery meter icon

Bug: 171368508
Test: verify on an issue device
Change-Id: I892e0d137143160a0bce0c11ce9265120ebb8fd4
2020-10-23 23:35:15 +08:00