summaryrefslogtreecommitdiff
path: root/packages/SettingsLib/tests
Commit message (Collapse)AuthorAgeFilesLines
* Always show all approved appsJulia Reynolds2025-01-131-1/+65
| | | | | | | | | | | | | | | Regardless of what the current criteria is in order to be approved, show everything that's currently approved, since the criteria might have been more lax when it was approved Test: manual Test: ServiceListingTest Flag: EXEMPT bug fix Bug: 365738306 (cherry picked from commit 234c5e843ca427b1dd47e91e3969f3309dd787bf) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0cafbe4e9bf9875709e9296e5d2fd5a7666364a2) Merged-In: I6c19d3dbff6ecabc74729a7f021f293e26601944 Change-Id: I6c19d3dbff6ecabc74729a7f021f293e26601944
* Fixes foldable autorotation setting being out of sync in QS and SettingsChristian Göllner2023-04-281-0/+15
| | | | | | | | | | | | | | | | | | Both QS (SystemUI) and Settings, were using the same class to update foldable auto-rotation settings. Since both are in different processes, they have different internal memory state. There was a bug where the internal state for the persisted setting was only changed in the process that changed the setting. When then trying to change the setting in the other process, it didn't work as it thought that the setting was the same as before. Test: DeviceStateRotationLockSettingsManagerTest.java Test: Manually - Change settings in both QS and Settings and read logs. Fixes: 279603743 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:435f835d908ea195d7882f3f747ec669ed9aea6d) Merged-In: I3f28027d5e24796ceb01fc1eb164aac8814a1753 Change-Id: I3f28027d5e24796ceb01fc1eb164aac8814a1753
* Merge "Foldable rotation settings: persist postures instead of device ↵Christian Göllner2023-03-161-5/+12
|\ | | | | | | states" into tm-qpr-dev
| * Foldable rotation settings: persist postures instead of device statesChristian Göllner2023-03-131-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device state ids can change, and therefore shouldn't be persisted. We define our custom ids for device postures, which will not change. 1. We define our custom posture ids in Settings.Secure. These match the current device state ids. This way we don't have to wipe users' settings. 2. We convert device ids to postures, based on the config arrays "config_foldedDeviceStates", "config_halfFoldedDeviceStates", and "config_openDeviceStates". Test: unit tests Test: manually by trying the different auto-rotation scenarios in different postures. Fixes: 261968395 Change-Id: I396e9c92230e75e186b6a70198ee16b41e508a1e
* | Merge "Allow filtering of services" into tm-qpr-devJulia Reynolds2023-03-151-1/+97
|\ \
| * | Allow filtering of servicesJulia Reynolds2023-03-141-1/+97
| |/ | | | | | | | | | | Test: ServiceListingTest Bug: 260570119 Change-Id: Ib4740ba401667de62fa1a33334c2c1fbee25b760
* / Add screensaver home control settingLucas Silva2023-03-131-3/+54
|/ | | | | | | | | | | This setting controls whether home controls are visible on the screensaver Bug: 271330583 Test: verified setting correctly disables/enables button Test: make -j64 RunSettingsLibRoboTests ROBOTEST_FILTER="com.android.settingslib.dream.DreamBackendTest" Test: atest ComplicationTypesUpdaterTest Change-Id: I44e0e8c4f81984604f4b47489b91f07285c75e15
* Device state rotation: fallback to defaults for invalid ignored stateChristian Göllner2023-03-061-0/+41
| | | | | | | | | | | | | | | | | Detect when we have a persisted invalid ignored state, and fallback to defaults. This can happen when the ids of device states change. This will cause persisted settings to be wiped, and defaults to be used. + Add more logging for easier debugging Bug: 269822414 Bug: 261968395 Test: Unit tests Test: Dumpsys Change-Id: I6d1845c758cac80ba5af14a6f6b2de40120bec0d
* Fix a11y announcements in DND duration dialogsMatías Hernández2023-02-222-0/+50
| | | | | | | | We are using a separate RadioButton just for the button and a view (possibly complex) fo the text. The latter didn't report an accurate selection status (especially when selecting, which didn't announce anything at all). Note that we are _not_ setting the "unselected" status to avoid repetition when walking through with Talkback (button -> text -> button -> text, ...). Fixes: 265468127 Test: Unit tests Change-Id: I87aad93d942a868776ecec163136fd9bfcb8276f
* Add new attribute to support lottie dynamic colorEdgar Wang2023-01-311-0/+16
| | | | | | Bug: 243889662 Test: manual Change-Id: Iba35e69ec18d8582358e16069e86f060797ad1bf
* Merge "Add a listener for when the illustration animation view is bound" ↵Mady Mellor2023-01-121-0/+29
|\ | | | | | | into tm-qpr-dev
| * Add a listener for when the illustration animation view is boundMady Mellor2022-11-291-0/+29
| | | | | | | | | | | | | | | | | | This allows users of the IllustrationPreference to update the colors in the animation view more easily. Bug: 243902048 Test: IllustrationPreferenceTest Change-Id: Iaeef38005c081f13a8517e18ef53460a164509a2
* | NEW Use Mockito 4.6.1 APISorin Basca2023-01-124-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | Address merge skipping issue Bug: 236636175 Test: m RunBackupEncryptionRoboTests Test: m RunBackupEncryptionIntegRoboTests Test: m RunSettingsRoboTests Test: m RunSettingsLibRoboTests Change-Id: Ife990fadad5114a76e455c2a16af18211bf5139c Merged-In: I0e301b641312f8cc4a235df5ec62acf1446cbb64
* | Merge "Revert "Use Mockito 4.6.1 API"" into tm-qpr-devKaren Lu2023-01-054-14/+14
|\ \
| * | Revert "Use Mockito 4.6.1 API"Karen Lu2023-01-054-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert submission 20749672-cherrypick-robo-mockito-4.6.1-4rg619yrrf Reason for revert: Breaking the build on tm-qpr-dev. Bug tracked here: b/264473028 Reverted changes: /q/submissionid:20749672-cherrypick-robo-mockito-4.6.1-4rg619yrrf Change-Id: I7d6269517432af430f465a25e3db3bdd35f62e6b
* | | Merge "Use Mockito 4.6.1 API" into tm-qpr-devKevin Liu2023-01-044-14/+14
|\| |
| * | Use Mockito 4.6.1 APISorin Basca2022-12-164-14/+14
| |/ | | | | | | | | | | | | | | | | | | Bug: 236636175 Test: m RunBackupEncryptionRoboTests Test: m RunBackupEncryptionIntegRoboTests Test: m RunSettingsRoboTests Test: m RunSettingsLibRoboTests Change-Id: I0e301b641312f8cc4a235df5ec62acf1446cbb64 Merged-In: I0e301b641312f8cc4a235df5ec62acf1446cbb64
* | Merge "Add communal settings category key." into tm-qpr-devDarrell Shi2022-12-211-1/+2
|\ \
| * | Add communal settings category key.Darrell Shi2022-12-151-1/+2
| |/ | | | | | | | | | | | | | | | | This change adds a new communal category key so that packages can inject preferences into the top-level Communal settings. Bug: 261641080 Test: atest CategoryTest Change-Id: I421c33858c38a8a571a21e8ce49b09ab121332df
* / [Unicast] Won't show "active" when changing active from HS to LEHSSongFerngWang2022-12-161-1/+44
|/ | | | | | | | | | | if the 'active device' is in the member device list, then the main device is active and then updating the main device's state. Bug: 259892289 Test: build pass. make RunSettingsLibRoboTests -j40 ROBOTEST_FILTER=BluetoothEventManagerTest Change-Id: I60d7cb40cc29ea12e5d4f12c10d44eda3e2cf4fe
* Enable network type icon overlays by carrier IdEvan Laird2022-11-101-0/+140
| | | | | | | | | | | | | | | | | | | | This CL builds out a new configuration resource `carrierid_icon_overrides`, and a format that allows for overriding a known network type with an arbitrary icon. We store a mapping of all known carrierId overrides that exist, and check for an override for the `carrierId & networkType` combination at runtime. This CL also caches the calculation in SystemUI since it represents a new expensive calculation potential at the time of display for the icon. Lastly, add demo mode command parsing for carrierId Test: atest MobileStateTest; atest NetworkControllerDataTest Test: manual using `-e carrierid <id>` network subcommand Bug: 241996752 Change-Id: Id0e8acf179db5c3a70f4caf31e58f8d8040690a0
* Merge "Revert "[LE unicast] The isBusy state should involve the state of sub ↵SongFerng Wang2022-10-261-76/+0
|\ | | | | | | device"" into tm-qpr-dev
| * Revert "[LE unicast] The isBusy state should involve the state of sub device"SongFerng Wang2022-10-251-76/+0
| | | | | | | | | | | | | | | | This reverts commit 4b2b34eef35a207906be2628bd57f03dfa310687. Reason for revert: According to b/253592180#comment6, we should hide the concept of member sets of a CSIP pairing or joining a group. The UI did not gray out device preference when the member is busy. Change-Id: Iae13955f34222854f7b1f6b767e9aed09cb3ba32
* | [SB Refactor] Fix MobileNetworkTypeIconsTestCaitlin Shkuratov2022-10-211-5/+5
| | | | | | | | | | | | | | Fixes: 254770925 Test: make -j8 RunSettingsLibRoboTests ROBOTEST_FILTER="com.android.settingslib.MobileNetworkTypeIconsTest" Change-Id: I1d358bec51cf705361b7d11f7dea53513edb20f9
* | Merge "[LE unicast] member device add PhonebookAccessPermission" into tm-qpr-devSongFerng Wang2022-10-191-0/+20
|\ \
| * | [LE unicast] member device add PhonebookAccessPermissionSongFerngWang2022-10-141-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add PhonebookAccessPermission into the member device before paring the member device by CSIP. Bug: 253541065 Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceManagerTest local test and result is on bug (pass) Change-Id: I37561dee7c104d869fad0eb06b37d4b4afd0b0fb
* | | [SB Refactor] Define MobileNetworkTypeIcon as an eventual replacement ofCaitlin Shkuratov2022-10-101-0/+59
|/ / | | | | | | | | | | | | | | | | | | | | | | MobileIconGroup and define a converter to convert from old to new. Also updates MobileIconGroup to just automatically fill in all the fields that are the same for all mobile icons. Bug: 238425913 Test: atest SystemUITests Test: MobileNetworkTypeIconsTest Change-Id: Ie4faca5a1001bf0c3b3d4854b3469b956fa47370
* | Merge "[LE unicast] The isBusy state should involve the state of sub device" ↵SongFerng Wang2022-09-281-0/+76
|\| | | | | | | into tm-qpr-dev
| * [LE unicast] The isBusy state should involve the state of sub deviceSongFerngWang2022-09-281-0/+76
| | | | | | | | | | | | Bug: 245697292 Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceTest Change-Id: I7fc640ccf30329e7a9bba7ad8b7e2485c39b8f6c
* | [Output Switcher] Adjust check for advanced iconshaoweishen2022-09-241-0/+41
| | | | | | | | | | | | | | | | | | | | Since advanced icon should be only applied on untethered device, add new method for check this. isAdvancedDetailsHeader will also return true if device type is watch or default, which should not use advanced icon. Bug: 246235835 Test: make RunSettingsLibRoboTests -j40 Change-Id: Ic7d52e78dc790b016a090f8e26c8444152294aed
* | Logs hearing aid information when a hearing aid is bonded(connected)Angela Wang2022-09-151-0/+74
|/ | | | | | | | | The information including device mode, device side, and entry page id where binding process starts. We only log the info once after the hearing aid is bonded. Without forgetting the bluetooth device, it won't log the info again if you disconnect and then reconnect it. Bug: 237344016 Test: m statsd_testdrive & statsd_testdrive 513 Change-Id: I57a17fd3a6b26855615ab8698c7d3a95e8438603 Merged-In: I57a17fd3a6b26855615ab8698c7d3a95e8438603
* [Output Switcher] Improvement for seekbar volume controlshaoweishen2022-09-131-2/+12
| | | | | | | | | | 1. dispatchDataChanged will not build devices again, we need to do that to update volume quicker. 2. dismiss dialog only when Media change to pause or stop. Bug: 243759774 Test: verified on device Change-Id: I9b93c7e21c899f011418ee51cec3be08c30004fa
* Merge "Prevent exfiltration of system files via avatar picker." into tm-dev ↵Oli Lan2022-09-131-36/+59
|\ | | | | | | | | | | | | | | | | am: 5489aa365f am: 33a08e907c Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19754655 Change-Id: If8ac10c7073bf7db345118010591da611ee82394 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * Prevent exfiltration of system files via avatar picker.Oli Lan2022-08-261-36/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds mitigations to prevent system files being exfiltrated via the settings content provider when a content URI is provided as a chosen user image. The mitigations are: 1) Copy the image to a new URI rather than the existing takePictureUri prior to cropping. 2) Only allow a system handler to respond to the CROP intent. This is a fixed version of ag/17005706, to address b/239513606. Bug: 187702830 Test: atest AvatarPhotoControllerTest Change-Id: I21f1b25154dc00a305bdadb96fdf22edff31d9b8
* | Fix hearing aid appears wrong side after device reboot.jasonwshsu2022-09-131-2/+34
| | | | | | | | | | | | | | | | | | | | Root Cause: Only set deviceSide() and deviceMode() when connection state change. Solution: Set deviceSide() and deviceMode() together with setHiSyncId() when HearingAidService connected and addDevice() into CachedBluetoothDevice. Bug: 243621489 Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=HearingAidDeviceManagerTest Change-Id: Iaa5a00311006c6e6bb9aaf565224627df1c5beaa
* | Merge "Revert "Prevent exfiltration of system files via avatar picker."" ↵TreeHugger Robot2022-09-081-59/+36
|\| | | | | | | | | | | | | | | | | into tm-dev am: 95e397a8b8 am: 8a0f592d2a Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19436694 Change-Id: Id41384d779e36513a04e1f65299007517a58f696 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * Revert "Prevent exfiltration of system files via avatar picker."Oli Lan2022-08-251-59/+36
| | | | | | | | | | | | | | | | | | This reverts commit 1325574d3a72fe2f8dba234ef04045565ab1aacb. Reason for revert: regression if multiple crop system crop handlers are present Test: atest AvatarPhotoControllerTest Change-Id: I4dac3ac8d27d2b6d664614dcfa9488d2dad7ee7d
* | Merge "[BT LE unicast] clear the GroupId when user click 'Forget'" into ↵SongFerng Wang2022-08-312-1/+31
|\ \ | | | | | | | | | tm-qpr-dev
| * | [BT LE unicast] clear the GroupId when user click 'Forget'SongFerngWang2022-08-252-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - To clear the groupId after device unpaired. - switchMemberDeviceContent don't change the member list. Bug: 240103816 Test: build pass. [pass] make RunSettingsLibRoboTests -j40 ROBOTEST_FILTER=CachedBluetoothDeviceManagerTest [psss] make RunSettingsLibRoboTests -j40 ROBOTEST_FILTER=CachedBluetoothDeviceTest Change-Id: I65dc254f33236fa7fad08a07e56187962700e6c6
* | | Merge "Add test case to check LineBreakWordStyle" into tm-qpr-devEdgar Wang2022-08-251-0/+12
|\ \ \
| * | | Add test case to check LineBreakWordStyleEdgar Wang2022-08-251-0/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | After Android T, settings apply phrase-based breaking Bug: 240462331 Test: robotest Change-Id: Iaf0f37f0b2eea6a4dcd45582f29b8c37ffea4e38
* | | Cleanup dream complication setting to reflect single toggle users see inLucas Silva2022-08-231-23/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Settings. The original implementation was designed to allow users to individually enable/disable certain complications. However, we have since decided to simplify the complication controls around a single master toggle. This fixes an issue where when new complications are added, we will no longer switch the toggle to off in Settings. Bug: 241469874 Test: atest ComplicationTypesUpdaterTest Test: atest DreamBackendTest Test: manually on device Change-Id: I1bbfbbe2abd6398b74bcd0b9ba601583a1403bef
* | | Add getTitle() for ButtonPreferencejasonwshsu2022-08-151-0/+1
|/ / | | | | | | | | | | | | Bug: 233038449 Test: make RunSettingsRoboTests ROBOTEST_FILTER=ButtonPreferenceTest Change-Id: Ie2f24879bce026e5bc3d7fedfcb3a6475ab7d404 Merged-In: Ie2f24879bce026e5bc3d7fedfcb3a6475ab7d404
* | Merge "[Output Switcher] Fix LocalMediaManagerTest" into tm-qpr-devShaowei Shen2022-07-281-73/+15
|\ \
| * | [Output Switcher] Fix LocalMediaManagerTestshaoweishen2022-07-211-73/+15
| | | | | | | | | | | | | | | | | | Bug: 239775765 Test: make RunSettingsLibRoboTests -j40 Change-Id: Ia56f31fa872ad8c0679c7fa6c86a9b58805548e9
* | | NetworkCallback.onLost should only clear primary wifi networkQuang Luong2022-07-111-0/+125
|/ / | | | | | | | | | | | | | | | | | | | | NetworkCallback.onLost may be called for secondary wifi networks, but this results in the wifi info being cleared from the status bar. We should instead only clear the wifi info if the lost network is the primary network. Bug: 236368704 Test: make RunSettingsLibRoboTests -j40 Change-Id: Iafd380c6b651921c17e21db11ca94541b0a6e738
* | Merge "Fix ASHA Hearing aids connection status incorrect" into tm-dev am: ↵Jason Hsu2022-05-262-6/+12
|\| | | | | | | | | | | | | | | | | 53ac502a1a am: ce300ed1ee Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18579490 Change-Id: Ic819da94519d129d7e67f5db509175161bd282c3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * Merge "Fix ASHA Hearing aids connection status incorrect" into tm-devJason Hsu2022-05-262-6/+12
| |\
| | * Fix ASHA Hearing aids connection status incorrectjasonwshsu2022-05-252-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Root Cause: After disconnecting one side of hearing aid, the mainDevice did not update device side information from subDevice. Solution: switch subDevice information to mainDevice. Bug: 233708857 Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceTest Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=HearingAidDeviceManagerTest Change-Id: I5977c11828464863610cfdaabd91154b710b4151
* | | Make Settings battery entries support dock chargingWesley Wang2022-05-251-0/+11
| | | | | | | | | | | | | | | | | | Bug: 233033937 Test: make SettingsLibRoboTests Change-Id: Ib105ceb6c016fc384f0b8c38200d74369e648513