Commit Graph

17830 Commits

Author SHA1 Message Date
Tetiana Meronyk
3ade4a3ad7 Disable toggle on managed device with "Disallow add user" or "Disallow switch user"
Bug: 244279615
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.MultiUserSwitchBarControllerTest"
Change-Id: I3e89c8fac1828b4c9bb1c7df08687684981bda11
2022-10-24 22:06:57 +00:00
Shaowei Shen
a86576b975 Merge "[Sound Panel] Fix bugs for sound panel slice" into tm-qpr-dev am: 02cf722b24 am: 713aa67d90
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19636172

Change-Id: I02cd0836aca7e7cb6c2583c3aee4b5dadaddf137
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-24 13:53:08 +00:00
Shaowei Shen
713aa67d90 Merge "[Sound Panel] Fix bugs for sound panel slice" into tm-qpr-dev am: 02cf722b24
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19636172

Change-Id: Ia485be78358748e474650b76c3035d8787a3d33d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-24 13:20:55 +00:00
Shaowei Shen
02cf722b24 Merge "[Sound Panel] Fix bugs for sound panel slice" into tm-qpr-dev 2022-10-24 12:43:06 +00:00
changbetty
4f42ca1eac [LE Audio] Remove the broadcast icon when the device does not support
broadcast feature

Bug: 254743785
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=MediaOutputIndicatorWorkerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=MediaVolumePreferenceControllerTest
Change-Id: I02e429b3a306e2f9b0e2342118649208617c4944
2022-10-24 12:03:23 +00:00
changbetty
abc69c34de [LE Audio] Only add main device for LE Audio devices in Take call on
list

Bug: 254212589
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AudioOutputSwitchPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HandsFreeProfileOutputPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=MediaOutputPreferenceControllerTest
Change-Id: I7831f12ca259aac3d60f4370ffc659a32fed3296
2022-10-24 06:52:03 +00:00
TreeHugger Robot
dda18d1d8c Merge "Add config for Wi-Fi Hotspot Settings hidden" into tm-qpr-dev am: 87d2f6d3cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20244146

Change-Id: I7b3275ffad2af79bb81c3761b691ab793a61168a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-24 03:26:46 +00:00
TreeHugger Robot
87d2f6d3cb Merge "Add config for Wi-Fi Hotspot Settings hidden" into tm-qpr-dev 2022-10-24 03:04:59 +00:00
Cole Faust
43ff89802c Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I29f691a22617b1fc834680ff1cf4ab4244203f06
2022-10-23 12:41:39 -07:00
Bonian Chen
d9ea5b0692 Merge "[Settings] configuration for hidding SIM notification UI" 2022-10-21 13:29:18 +00:00
Bonian Chen
6eb3f717b8 Merge "[Settings] configuration for hidding SIM lock UI" 2022-10-21 13:29:18 +00:00
Bonian Chen
71db4e8732 Merge "[Settings] configuration for hidding SIM remove UI" 2022-10-21 13:29:18 +00:00
Bonian Chen
210fba096f Merge "[Settings] configuration for hidding SIM provider UI" 2022-10-21 13:29:18 +00:00
Bonian Chen
d07157691e Merge "[Settings] configuration for hidding SIM settings UI" 2022-10-21 13:29:18 +00:00
Bonian Chen
a4aca19f8f Merge "[Settings] configuration for hidding SIM related UI" 2022-10-21 13:29:18 +00:00
Chaohui Wang
fd9997f156 Merge "Add DefaultAppShortcuts for Spa" 2022-10-21 11:09:46 +00:00
Bonian Chen
7c3f04aa11 [Settings] configuration for hidding SIM lock UI
Hide SIM lock UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: I870c0b53112db56b7bc80bfd585f6f7b3cf82737
2022-10-21 10:59:11 +00:00
Julia Reynolds
1d54859168 Update category to intent action
Test: settings unit tests
Bug: 254339351
Change-Id: I6c4bfb474408cd9ab95ae3fbd80a89760a4b7844
2022-10-21 10:09:02 +00:00
Bonian Chen
5dae24208b [Settings] configuration for hidding SIM related UI
Add overriable configuration for hidding SIM related UI.

Bug: 240515161
Test: test cases and local testing
Change-Id: I8d7ddd18861a696830da39f040dfb14b9ed46726
2022-10-21 09:21:59 +00:00
Philip Junker
638693c203 Merge "Only list apps with android.permission.TURN_SCREEN_ON." 2022-10-21 08:13:09 +00:00
Chaohui Wang
a8e19e0f2c Add DefaultAppShortcuts for Spa
Including the following,
- Home app
- Browser app
- Phone app
- Emergency app
- SMS app

Bug: 236346018
Test: Manual with App Info page
Test: Settings Unit tests
Change-Id: I4ceb31ed521b758a6f91d7e86fd34c780442b1ac
2022-10-21 15:43:12 +08:00
Shen Lin
bb2fb2ffd6 Ensure search highlight position when scheduled runnable starts
Search highlight function includes two steps: Scroll list to target position first, then notifyItemChanged to it.

We use a Handler.postDelay to implement this. However, when scheduled runnable starts, the original target position could have changed due to preference list update, calling recyclerview's methods after that will be easy to cause an exception.

This CL ensures highlight position every time before calling recyclerView update, which also contribute to origin fix of RecyclerView IllegalArgumentException to a certain extent.

Test: atest, also test some search results, and see the correct behavior
Fixes: 246411107

Change-Id: Ifa758ce3718b047138079246cdfce99fdf66d5b2
2022-10-21 14:01:47 +08:00
Kuan Wang
cbaffa34bc Add functions of SI DatabaseUtils into Settings DatabaseUtils and remove
unused functions.

Bug: 253395332
Test: make RunSettingsRoboTests
Change-Id: I61feee3386d7291f9174acb884d09d7ab8733511
2022-10-21 04:48:14 +00:00
Kuan Wang
c7afa45eac Clean up unused function getHideApplicationSummary in
PowerUsageFeatureProvider.

Bug: 253395332
Bug: 254769892
Bug: 254769770
Test: make RunSettingsRoboTests
Change-Id: I6acf0cbdb7321934e85939e0acee567001107a17
2022-10-21 04:42:06 +00:00
Milton Wu
eff9effb25 Merge "Retry fingerprint or face unlock" into tm-qpr-dev am: c1d0d230d4 am: 96f959737c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20188600

Change-Id: I9c05b7bf43304fead4ae03a23a5106afe55612f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 02:12:23 +00:00
Milton Wu
96f959737c Merge "Retry fingerprint or face unlock" into tm-qpr-dev am: c1d0d230d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20188600

Change-Id: I24e093bb5dac1fcce152a85b332a19c3df5aa77b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-21 01:41:51 +00:00
Milton Wu
c1d0d230d4 Merge "Retry fingerprint or face unlock" into tm-qpr-dev 2022-10-21 01:08:37 +00:00
Tetiana Meronyk
9183d06d41 Merge "Show other users in storage settings" 2022-10-20 16:20:41 +00:00
TreeHugger Robot
fbf9c8fee6 Merge "Fix UwbPreferenceControllerTest" 2022-10-20 14:49:30 +00:00
Bonian Chen
2f07595eb0 [Settings] configuration for hidding SIM provider UI
Hide SIM provider UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: I1cb83787dc1ac1d61bb6bed6aa9c5e7a3ad6e69b
2022-10-20 11:35:28 +00:00
Bonian Chen
504e71c284 [Settings] configuration for hidding SIM notification UI
Hide SIM notification UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: I07d9ddeb96ca590decf28126ce97fba4c1783304
2022-10-20 10:11:11 +00:00
Bonian Chen
69f6e76f2c [Settings] configuration for hidding SIM remove UI
Hide SIM remove UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
2022-10-20 09:59:01 +00:00
Weng Su
f9b5e046a8 Add config for Wi-Fi Hotspot Settings hidden
- Add config_show_wifi_hotspot_settings for Settings customization

- Hide Wi-Fi Hotspot preference in Hotspot & tethering Settings

- Don't launch Wi-Fi Hotspot Settings (e.g long press on Hotspot in QS-tile)

Bug: 213426762
Test: manual test
atest -c com.android.settings.wifi.WifiUtilsTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherPreferenceControllerTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherSettingsTest

Merged-In: I11f88d0d15d6d5c2766b64b5847ac31ed0f34c25
Change-Id: I11f88d0d15d6d5c2766b64b5847ac31ed0f34c25
(cherry picked from commit 160b5078ed)
2022-10-20 09:50:22 +00:00
Bonian Chen
5bcfa284a9 [Settings] configuration for hidding SIM settings UI
Hide SIM settings UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: If1df99a79e51125d03f534cdfc9408b01c61024f
2022-10-20 09:46:44 +00:00
Chaohui Wang
6d39e5c911 Add AppOpenByDefaultPreference for Spa
The "Open by Default" in App Info page.

Bug: 236346018
Test: Manual with App Info page
Test: Settings Unit tests
Change-Id: I20f827241ff46bca28440b56fd32a0712ee439f9
2022-10-20 17:28:46 +08:00
TreeHugger Robot
c757a12a4e Merge "Add config for Wi-Fi Hotspot Settings hidden" 2022-10-20 06:08:55 +00:00
shaoweishen
66098febbc [Sound Panel] Fix bugs for sound panel slice
1. notify item change when slice live data has update
2. keep showing Output Switcher slice when media state is in "Pause"
   state

Bug: 247043239
Bug: 238715094
Bug: 204165377
Test: verified on device
Change-Id: Ic56a70f2f2835231519e2fccf0d2e649d41b106e
2022-10-20 02:46:41 +00:00
Gil Cukierman
a2ddff3865 Honor DISALLOW_CELLULAR_2G User Restriction in Enable2gPreferenceController
When 2g is disallowed by a device admin the 2g toggle in the preference
screen will implement the following behaviors as a result of being
changed to a RestrictedSwitchPreference:
1. become disabled (greyed out)
2. show a summary message explaining that the preference was disabled by
   an admin
3 show a pop up when a user tries to click on the preference informing
  them that the setting is unusable because it was disabled by an admin.

Additionally, the toggle will show as unchecked (off) when admins
disable 2g.

When 2g is re-enabled by a device admin, the preference screen will go back
to its previous state.

Test: atest Enable2gPreferenceControllerTest
Bug: b/248250240
Change-Id: I7af901f2d9f62ebfe884e01724d8eff845c2968e
2022-10-19 21:01:17 +00:00
Joy Babafemi
eb2532388b Fix UwbPreferenceControllerTest
Bug: 253386238
Test: atest UwbPreferenceControllerTest
Change-Id: I32c07f3bdbf0540ec372b72be945aa07e5d29d62
2022-10-19 19:33:47 +00:00
Milton Wu
5a47cf56ef Retry fingerprint or face unlock
When IllegalStateException happens during user enters `Fingerprint
Unlock` or `Face Unlock` page through `Face and Fingerprint Unlock`
page, show ConfirmLock for user to re-enter credential again.
If user fails to pass credential page, finish activity and back to
`Security` page.
If user success to pass credential page, enter `Fingerprint Unlock` or
`Face Unlock` page.

Test: Manully test timeout case on `Face and Fingerprint Unlock` page
Test: robotest for CombinedBiometricProfileSettingsTest
      FaceSettingsLockscreenBypassPreferenceControllerTest
Bug: 248165760
Change-Id: I3361c38d09d14461db8ecf2d89a34ba9604dc7e8
2022-10-19 23:55:39 +08:00
Weng Su
160b5078ed Add config for Wi-Fi Hotspot Settings hidden
- Add config_show_wifi_hotspot_settings for Settings customization

- Hide Wi-Fi Hotspot preference in Hotspot & tethering Settings

- Don't launch Wi-Fi Hotspot Settings (e.g long press on Hotspot in QS-tile)

Bug: 213426762
Test: manual test
atest -c com.android.settings.wifi.WifiUtilsTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherPreferenceControllerTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherSettingsTest

Change-Id: I11f88d0d15d6d5c2766b64b5847ac31ed0f34c25
2022-10-19 20:13:21 +08:00
Chaohui Wang
402744eb36 Add AppButtonRepositoryTest
Bug: 236346018
Test: Unit test
Change-Id: I174bad92ef5357ba0ea0e32cb0435d700a11dc51
2022-10-19 19:55:01 +08:00
Chaohui Wang
cb7fa280f3 Merge "Make the default getTimeSpentInApp() return empty" 2022-10-19 11:50:48 +00:00
Tetiana Meronyk
5c0bb75de8 Show other users in storage settings
Bug: 232969364
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.deviceinfo.storage.NonCurrentUserControllerTest"
Change-Id: I8d933bec8f12faa971684939b722cfae957f4953
2022-10-19 10:44:06 +00:00
Chaohui Wang
b752c3d058 Make the default getTimeSpentInApp() return empty
Current ApplicationFeatureProvider.getTimeSpentInApp() defaults returns
null, in extreme case there is ACTION_APP_USAGE_SETTINGS handler on
device but getTimeSpentInApp() still returns null, may lead
AppTimeSpentPreference to crash.

Make it returns empty string instead to eliminate this extreme case.

Bug: 236346018
Test: Unit test & Manual with SpaActivity
Change-Id: I33b413ceb9bdf48e3902e02c91fab617fe297862
2022-10-19 15:57:50 +08:00
Zoey Chen
ced43b33f2 Merge "[Settings] Change the way in NetworkProviderCallsSmsController for getting the subscription info from room db part2" 2022-10-19 04:29:21 +00:00
Kuan Wang
b036cfabd6 Merge "Copy DatabaseUtils from SettingsGoogle to Settings and use the new Settings database." 2022-10-19 02:20:16 +00:00
Kuan Wang
547df61667 Copy DatabaseUtils from SettingsGoogle to Settings and use the new
Settings database.

Bug: 253395332
Test: make RunSettingsRoboTests
Change-Id: Idbe6d71b69b28d344db146d139b4b60e2e7434da
2022-10-19 02:20:00 +00:00
Kuan Wang
fb136dd8d5 Copy BatteryUsageLoaderService and BatteryBroadcastReceiver from
SettingsGoogle to Settings and rename them to BatteryUsageDataLoader and
BatteryUsageBroadcastReceiver.

Bug: 253395332
Test: make RunSettingsRoboTests
Change-Id: Ide7c572a7df826ca576223c297b8ec78c45cc94e
2022-10-19 02:19:57 +00:00
Julia Reynolds
b495103ca7 Merge "Add link to more app settings" 2022-10-18 19:32:27 +00:00