summaryrefslogtreecommitdiff
path: root/packages/SettingsProvider/src/com/android
Commit message (Collapse)AuthorAgeFilesLines
* RingtoneManager: allow video ringtone URIJean-Michel Trivi2024-11-181-4/+7
| | | | | | | | | | | When checking the MIME type for the default ringtone, also allow it to refer to video content. Bug: 205837340 Test: see POC + atest android.media.audio.cts.RingtoneManagerTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:de83ef4f51cad7ea1eb91f5d328d79b719251abe) Merged-In: Iac9f27f14bae29e0fabc31e05da2357f6f4f16c7 Change-Id: Iac9f27f14bae29e0fabc31e05da2357f6f4f16c7
* [SettingsProvider] verify ringtone URI before settingSongchun Fan2023-11-101-0/+31
| | | | | | | | | | | | | Similar to ag/24422287, but the same URI verification should be done in SettingsProvider as well, which can be called by apps via Settings.System API or ContentProvider APIs without using RingtoneManager. BUG: 227201030 Test: manual with a test app. Will add a CTS test. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1b234678ec122994ccbfc52ac48aafdad7fdb1ed) Merged-In: Ic0ffa1db14b5660d02880b632a7f2ad9e6e5d84b Change-Id: Ic0ffa1db14b5660d02880b632a7f2ad9e6e5d84b
* RESTRICT AUTOMERGE: SettingsProvider: exclude secure_frp_mode from resetsEric Biggers2023-10-071-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When RescueParty detects that a system process is crashing frequently, it tries to recover in various ways, such as by resetting all settings. Unfortunately, this included resetting the secure_frp_mode setting, which is the means by which the system keeps track of whether the Factory Reset Protection (FRP) challenge has been passed yet. With this setting reset, some FRP restrictions went away and it became possible to bypass FRP by setting a new lockscreen credential. Fix this by excluding secure_frp_mode from resets. Note: currently this bug isn't reproducible on 'main' due to ag/23727749 disabling much of RescueParty, but that is a temporary change. Bug: 253043065 Test: With ag/23727749 reverted and with my fix to prevent com.android.settings from crashing *not* applied, tried repeatedly setting lockscreen credential while in FRP mode, using the smartlock setup activity launched by intent via adb. Verified that although RescueParty is still triggered after 5 attempts, secure_frp_mode is no longer reset (its value remains "1"). Test: Verified that secure_frp_mode still gets changed from 1 to 0 when FRP is passed legitimately. Test: atest com.android.providers.settings.SettingsProviderTest Test: atest android.provider.SettingsProviderTest (cherry picked from commit 9890dd7f15c091f7d1a09e4fddb9f85d32015955) (changed Global.SECURE_FRP_MODE to Secure.SECURE_FRP_MODE, needed because this setting was moved in U) (removed static keyword from shouldExcludeSettingFromReset(), needed for compatibility with Java 15 and earlier) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8c2d2c6fc91c6b80809a91ac510667af24d2cf17) Merged-In: Id95ed43b9cc2208090064392bcd5dc012710af93 Change-Id: Id95ed43b9cc2208090064392bcd5dc012710af93
* Merge tag 'android-13.0.0_r52' of ↵George Zacharia2023-08-022-0/+19
|\ | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 Release 52 (TQ3A.230605.012) Change-Id: Ic80f318636f1f70bbd009504352ddde511d0dead
| * Add setting to disable PIN animation and passwordAndreas Miko2023-03-141-0/+9
| | | | | | | | | | | | | | | | Test: Unit - atest SettingsRoboTests Test: Manual - Set PIN lock and enabled/disabled the setting to observe animation change during PIN entry Bug: b/204799468 Merged-In: I587b993ef5515a075442e82ebafae88bebdffc20 Change-Id: I587b993ef5515a075442e82ebafae88bebdffc20
| * Add key ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGEDCandice Lo2023-03-071-0/+3
| | | | | | | | | | | | | | | | | | | | We use the key to track if users change the font size in Settings and not use the default scaled value. Bug: 269679768 Test: atest SettingsProviderTest Change-Id: I8854f484ddec4669aa08b3ca60590fdb198dd970 Merged-In: I6a20e2af38064be2b03e2cdda530964989a2d0b0
| * Do not restore auto-rotation setting when target device is a tabletbeatricemarch2023-01-311-0/+7
| | | | | | | | | | | | | | | | Test: atest SettingsProviderTest:SettingsBackupAgentTest and manual testing (Restore to a tablet, verify that the rotation setting is not restored, verify that the UI behaves as intended, verify that the correct SettingsBackupAgent logs are prinded. Restore to a phone verify that the rotation setting is restored) Bug: 265756332 Bug: 243489549 Fixes: 243489549 Change-Id: I9d34ee096c99f4a510398edd84fa97713945fe5d
* | Merge tag 'android-13.0.0_r35' of ↵George Zacharia2023-04-033-2/+39
|\| | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 release 35 Change-Id: I709958b2f015d1774b2ece25894467c3a279f93c
| * Secure setting to control seen notif filterSteve Elliott2022-12-141-1/+21
| | | | | | | | | | | | | | | | | | Bug: 254647461 Test: manual 1: adb shell settings put secure \ lock_screen_show_only_unseen_notifications <0|1> Observe: seen notifs will appear / disappear from keyguard Change-Id: Ia660fabc7077f5060e3b63d36dca2eb6310d792e
| * Maintain the users current value for STATUS_BAR_SHOW_VIBRATE_ICONEdward Savage-Jones2022-12-091-7/+11
| | | | | | | | | | | | | | | | | | | | Make sure not to overwrite any current user selection for Secure.STATUS_BAR_SHOW_VIBRATE_ICON that the user may have made. Issue: 253992986 Test: Manual - see issue Change-Id: I33155a27707e6d30ff56fb090c71b9670a98fc31
| * Add settings default handling for STATUS_BAR_SHOW_VIBRATE_ICONEdward Savage-Jones2022-12-051-2/+12
| | | | | | | | | | | | | | | | | | Make the Secure.STATUS_BAR_SHOW_VIBRATE_ICON default configurable Bug: 253992986 Test: manual - see issue Change-Id: Ibada490c823a47ef145d9b50cadd4838c687711e Merged-In: Ibada490c823a47ef145d9b50cadd4838c687711e
| * Add contrast level in settingsAurélien Pomini2022-11-231-0/+3
| | | | | | | | | | | | | | Test: treehugger Bug: 259091608 Change-Id: Ib68b6688fdc06843b80a2582a78942b514149f3e
| * Merge "[RESTRICT AUTOMERGE][SettingsProvider] key size limit for mutating ↵Song Chun Fan2022-10-271-13/+27
| |\ | | | | | | | | | settings" into tm-qpr-dev
| | * [RESTRICT AUTOMERGE][SettingsProvider] key size limit for mutating settingsSongchun Fan2022-10-211-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to targetSdk 22, apps could add random system settings keys which opens an opportunity for OOM attacks. This CL adds a key size limit. BUG: 239415997 Test: manual; will add cts test Merged-In: Ic9e88c0cc3d7206c64ba5b5c7d15b50d1ffc9adc Change-Id: Ic9e88c0cc3d7206c64ba5b5c7d15b50d1ffc9adc (cherry picked from commit 783bcba343c480f6ccedaaff41ba7171a1082e0c)
| * | Only set locale in config for updating localeRiddle Hsu2022-10-201-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To update locale, it doesn't need a full configuration because system only applied the diff of config from non-undefined fields. IActivityManager#getConfiguration actually gets the configuration according to the pid, which is process configuration. And process configuration can be overridden by the activity running in its process. So the returned value shouldn't be used to update the system persistent configuration. Therefore it is enough to use a new Configuration instance with setting the necessary fields. This is also more efficient that saves a binder call to system. Bug: 253386061 Test: atest LocaleManagerTests Change-Id: Icdce437fcf1a3bef0562cfc4dd5ad3ba52ea08ef
| * [RESTRICT AUTOMERGE] [SettingsProvider] mem limit should be checked before ↵Songchun Fan2022-10-191-27/+48
| |\ | | | | | | | | | | | | | | | | | | | | | | | | settings are updated am: de2ba563d7 am: d3378a107e Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20226664 Change-Id: I2098548ff2ad9f33aede1d17e6c81bdd21692e0c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * [RESTRICT AUTOMERGE] [SettingsProvider] mem limit should be checked before ↵Songchun Fan2022-10-181-27/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | settings are updated Previously, a setting is updated before the memory usage limit check, which can be exploited by malicious apps and cause OoM DoS. This CL changes the logic to checkMemLimit -> update -> updateMemUsage. BUG: 239415861 Test: atest com.android.providers.settings.SettingsStateTest (cherry picked from commit 8eeb92950f4a7012d4cf282106a1418fd211f475) Merged-In: I20551a2dba9aa79efa0c064824f349f551c2c2e4 Change-Id: I20551a2dba9aa79efa0c064824f349f551c2c2e4
* | | Merge tag 'android-13.0.0_r20' into t13.0Semavi Ulusoy2023-01-041-28/+63
|\ \ \ | | | | | | | | | | | | | | | | | | | | Android 13.0.0 release 20 Change-Id: If4abc6a25843dbccba1fc3cc4250eb10b193f27c
| * | | [RESTRICT AUTOMERGE][SettingsProvider] key size limit for mutating settingsSongchun Fan2022-11-151-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to targetSdk 22, apps could add random system settings keys which opens an opportunity for OOM attacks. This CL adds a key size limit. BUG: 239415997 Test: manual; will add cts test Merged-In: Ic9e88c0cc3d7206c64ba5b5c7d15b50d1ffc9adc Change-Id: Ic9e88c0cc3d7206c64ba5b5c7d15b50d1ffc9adc (cherry picked from commit 783bcba343c480f6ccedaaff41ba7171a1082e0c) (cherry picked from commit f60e5a4b7ce47d21a6e707fdad7a865dc0b0f0a3) Merged-In: Ic9e88c0cc3d7206c64ba5b5c7d15b50d1ffc9adc
| * | | [RESTRICT AUTOMERGE] [SettingsProvider] mem limit should be checked before ↵Songchun Fan2022-11-151-27/+48
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | settings are updated Previously, a setting is updated before the memory usage limit check, which can be exploited by malicious apps and cause OoM DoS. This CL changes the logic to checkMemLimit -> update -> updateMemUsage. BUG: 239415861 Test: atest com.android.providers.settings.SettingsStateTest (cherry picked from commit 8eeb92950f4a7012d4cf282106a1418fd211f475) Merged-In: I20551a2dba9aa79efa0c064824f349f551c2c2e4 Change-Id: I20551a2dba9aa79efa0c064824f349f551c2c2e4 (cherry picked from commit d7a84dc64d2e19059ec742e0f644c3dc6095e15f) Merged-In: I20551a2dba9aa79efa0c064824f349f551c2c2e4
* | | Merge tag 'android-13.0.0_r16' into t13.0George Zacharia2022-12-153-4/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android 13.0.0 Release 16 (TQ1A.221205.011) Also included the following reverts: 1. Revert "fw/b: Import Wi-Fi standard icon [1/2]" 2. Revert "Add preference for toggling the wallpaper zooming animation" Co-authored-by: Semavi Ulusoy <doc.divxm@gmail.com> Change-Id: I9a6b51e452c28d10411712c59778bb54da5783e9
| * | wifi: Fix unnecessary notification after restoring config from cloud.Les Lee2022-07-261-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The persistent randomzied MAC address is generated by hash function with key Ssid. It might be different in different device even if the key doesn't be changed. But the persist randomized MAC is not a user setting, it is generated by the frameworks. Ahe user would need to set up the ACL again anyways even if they use factory MAC. So it should not to notify user configuration is changed since it is not a user setting and user aware it since user is using a new device. BUg: 235591501 Test: Manual test, no notification show up. Change-Id: I08fef497df0c42115ee61e92a22009d32666da41
| * | Add a Settings.Secure value to store extra battery saver scheduleWesley Wang2022-07-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - To store extra battery saver schedule mode Bug: 224899180 Bug: 236688783 Bug: 238841059 Test: Build pass and local access verify Change-Id: I4a394de04fdb9020ce22377390b81bccfaec2090
| * | Merge "wifi: Fix unnecessary notification after restoring config from ↵Les Lee2022-05-121-1/+51
| |\| | | | | | | | | | | | | | | | | | | | | | | | | cloud." into tm-dev am: f2bd49af42 am: f2b0f97075 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18231924 Change-Id: I152497dd50f4f11789bfab5522461a08d81ede15 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * | Merge "Remove notification permission feature flag" into tm-dev am: ↵Julia Reynolds2022-05-091-10/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | af7982277b am: 1c7aab6735 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18164160 Change-Id: Ie439e1d17ace323879e1c7fa2ceeb0be866954ed Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * \ \ Merge "Implement backup & restore for the device state based auto rotation ↵TreeHugger Robot2022-05-061-0/+10
| |\ \ \ | | | | | | | | | | | | | | | setting" into tm-qpr-dev
| | * | | Implement backup & restore for the device state based auto rotation settingChristian Göllner2022-05-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds the setting to DeviceSpecificSettings so that it is only restored on the same device - Prevents the non-device state based setting to be restored if device stated based settings are enabled Fixes: 196933725 Test: atest SettingsHelperTest Change-Id: I58163cb70e8136104370ae7c1cdaaa8b7124b853
* | | | | Forward port CM Screen Security settings (1/2)Michael Bestas2022-10-261-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Variable size pattern lockscreen * Toggle dots/error pattern visibility Change-Id: Ie109e82c1fb2fd96b07e977e1cd76ae3acb865ff Fix pattern visibility settings (1/2) Change-Id: Ic627953c5df854c442671a98b5da539b994da18b LockPatternUtils: Use the actual user id to set pattern size Ticket: CYNGNOS-2462 Change-Id: Ia68e26ec2dfc23317135d933bc25204c1380bb02 LockSettings: fix build Change-Id: Ic65b1a2af398faffb83776ee4013d47f79ab6619 Signed-off-by: Roman Birg <roman@cyngn.com>
* | | | | Phone ringtone setting for Multi SIM device [1/3]Ting Yu2022-10-261-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add below changes for Multi SIM device phone ringtone. 1. Add api setActualDefaultRingtoneUriForPhoneAccountHandle to set ringtone for specific PhoneAccountHandle. 2. Add api getActualDefaultRingtoneUriForPhoneAccountHandle to get ringtone for specific PhoneAccountHandle. 3. Support saving ringtone cache for specific PhoneAccountHandle. Bug: 118735436 Test: Manual, CTS Test Change-Id: I26c20ef52753256e1148ee9b01492034f55a3bd4
* | | | | SettingsProvider: Handle WRITE_DEVICE_CONFIG permission denial for gmscjh12491313562022-10-261-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: cjh1249131356 <cjh1249131356@gmail.com> Change-Id: I49aefbf344fad359256f72bcd76df2cb531177fe
* | | | | SettingsProvider: Resolve package name that requires permissionPranav Vashi2022-10-181-1/+2
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Google is confused between developer and magician. It assumed that developer will understand which app is complaining about not having permission using magic wand. * Bonus after this patch - it turned out that Google itself required permission: 04-16 01:35:40.293 W/anzv (3239): java.lang.SecurityException: Permission denial: com.google.android.gms writing to settings requires:android.permission.WRITE_DEVICE_CONFIG Change-Id: I290035cff53ffba6256462cbbf7db1b7ccbc0285
* | | | Merge "wifi: Fix unnecessary notification after restoring config from ↵Les Lee2022-05-121-1/+51
|\ \ \ \ | |_|_|/ |/| | | | | | | cloud." into tm-dev
| * | | wifi: Fix unnecessary notification after restoring config from cloud.Les Lee2022-05-101-1/+51
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some configurations which are generated by frameworks. When restoring configuration from cloud, the restored config didn't include those configurations. It causes the configuration mismatch and show notification "configuration have changed". It should bypass them to avoid showing notification. Bug: 230411358 Test: manual test Change-Id: Icc58aa05f47a91fb150664e7247281dd77d3dbd8
* / / Remove notification permission feature flagJulia Reynolds2022-05-041-10/+1
|/ / | | | | | | | | | | | | | | And the related obsolete code. Test: SystemUITests, framework services tests, NotificationManagerTest Fixes: 231344755 Change-Id: Id14941f82305b0216f2a12221d4195f8afcc65ab
* | Revert "Revert "[SettingsProvider] enforce permission on openFile""Songchun Fan2022-04-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Prevent third-party apps to write to ring tone files without permission. This reverts commit 3726d5247ac10578ff1677b085d2d905027613d8. Reason for revert: use appops manager's permission check method BUG: 222687217 Test: atest android.appsecurity.cts.ExternalStorageHostTest#testExternalStorageReadDefaultUris Change-Id: I5121bb7975e7a3893eefbf2ddbe6c9c6a82c6c74
* | Revert "[SettingsProvider] enforce permission on openFile"Songchun Fan2022-04-291-3/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 5b50cebd18661f9ec3e0ca05516918afbabdb02b. Reason for revert: should check appops permission instead because the permission is granted upon user approval Bug: 230791848 Change-Id: Icc86eb38372753a5f6aa8b91918ecb4b120c1fa8
* | [SettingsProvider] enforce permission on openFileSongchun Fan2022-04-271-0/+3
|/ | | | | | | | | Prevent third-party apps to write to ring tone files without permission. BUG: 222687217 Test: manual debug app Test: will add a CTS Change-Id: I759b9674172e2bdb518c1dccfff0f20047343bf0
* Migrate NETWORK_ACCESS_TIMEOUT flag to DeviceConfig.Sudheer Shanka2022-04-181-3/+0
| | | | | | Bug: 226299593 Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java Change-Id: I8aca6ac906657cf82742fdc5c32dcd9715cd8353
* Merge "Restore long press power behaviour setting" into tm-devJernej Virag2022-03-221-0/+71
|\
| * Restore long press power behaviour settingJernej Virag2022-03-221-0/+71
| | | | | | | | | | | | | | | | The LPP setting is a bit special - the behaviour is configured by the config.xml and can then be modified via user setting to invoke Assistant if available. When restoring this value we need to be careful to not clobber default config.xml device settings if the user can't change it later. We strongly prefer to rely on config.xml device value in any case. Bug: 215540406 Test: atest SettingsProvider Change-Id: I8898a52a5d28f0957f44f3075498b1139c8ce831
* | [SettingsProvider] fix timestamp format in dumpSongchun Fan2022-03-211-1/+1
|/ | | | | | | | | | | | Changing from: 1970-01-03 19:31:20 update screen_brightness To: 2022-03-21 21:01:19 update screen_brightness BUG: 225956913 Test: manual Change-Id: I27d19779a207d8479b3ff4ed1e6343799d017d30
* Start/end the navbar proto tokens in the secure settings dump logic.Pat Manning2022-03-081-0/+2
| | | | | | Test: atest com.android.server.cts.SettingsIncidentTest#testBasicStructure Fix: 223214722 Change-Id: I84a15f562813e62bbb89cd417396dcca89381e4f
* Refactor force visible nav bar into new secure setting.Pat Manning2022-02-241-1/+4
| | | | | | | | Decouples force visible from kids mode setting. Bug: 217668440 Test: manual Change-Id: I363a2507cd1b073f44ed91e96b1dce7b3cd347c4
* Merge "Add a Settings.Global feature flag to toggle role holder provisioning"Antoan Angelov2022-02-141-0/+8
|\
| * Add a Settings.Global feature flag to toggle role holder provisioningarangelov2022-02-111-0/+8
| | | | | | | | | | | | | | | | This will be useful for testing. Bug: 218686349 Test: none Change-Id: I21c9de56638827beb092eeeb2cdc70940e6377f0
* | Close dangling cursorNikolas Havrikov2022-02-101-19/+21
|/ | | | | | | Bug: 218835043 Bug: 200920338 Test: make Change-Id: I8cdbe1a20457afe9632306aa3e2efd13a759c2c3
* Revert^2 "Enable notification permission feature"Julia Reynolds2022-02-071-4/+8
| | | | | | 7940ad02a778c3e681195c6d79dc9c271ae25048 Change-Id: Ie76e1bf9ffd3cfdc8a24f3e53e0add3f285dd910
* Revert "Enable notification permission feature"Shubham Dubey2022-02-071-8/+4
| | | | | | | | | | | | | | | | | | Revert "Ask for notification permission" Revert submission 16789354-jr-enable-perm-feature Reason for revert: Breaking Camera and Notification tests BUG:218116478 BUG:218116141 BUG:218220073 BUG:218219131 Reverted Changes: Ife73f3d46:Ask for notification permission I718cc8cb1:Enable notification permission feature Change-Id: I9cb652b91861d0e68d8b0f783c0499f97bd6c291
* Enable notification permission featureJulia Reynolds2022-02-041-4/+8
| | | | | | | | | | Missed the space the first time Fixes: 217428011 Bug: 217942983 Test: upgrade from device with 209 settings version to 210 settings Test: upgrade from S to T with 210 settings Change-Id: I718cc8cb175a1b793fc8a45443aee7c705bbf203
* [pm] small refactor for InstallLocationUtilsSongchun Fan2022-01-311-3/+3
| | | | | | | | | | | + Renaming to reflect the actual functionality of the class. + Move freeStorage related code to PackageManagerService, we will want to clean that up later. BUG: 198177734 Test: atest InstallLocationUtilsTest Change-Id: I951129ffb5e53df548ef78fcd9de79c0ef994914