Commit Graph

23874 Commits

Author SHA1 Message Date
Azhara Assanova
f2f9874122 Merge "[AAPM] Add advanced protection dialog according to API feedback" into main 2024-12-19 09:41:27 -08:00
Vladimir Komsiyski
af3e3026ff VDM Settings
Demo: go/vdm-settings-demo

Bug: 371713473
Bug: 338974320
Test: atest
Flag: android.companion.virtualdevice.flags.vdm_settings
Change-Id: I4a818b1b31ad59ee3de22105b969aec4c7f4d529
2024-12-19 04:57:19 -08:00
Daniel Norman
5e390e57b5 Merge "Strings updates for the new version of High contrast text." into main 2024-12-18 20:24:22 -08:00
Treehugger Robot
352a867aec Merge "[Catalyst] Include read/write permissions in get preference API" into main 2024-12-18 20:11:28 -08:00
Daniel Norman
d6e53163fd Strings updates for the new version of High contrast text.
These strings may be replaced again after our UX Writing team provides
new strings for the final public release.

Bug: 384791485
Test: observe new strings; see http://b/384791485#comment2
Flag: EXEMPT strings changes
Change-Id: I5359bc3d6faca84238fe00801a5d68e5ef8ffc2f
2024-12-18 18:35:45 -08:00
Jacky Wang
a8dad23365 [Catalyst] Include read/write permissions in get preference API
Bug: 374115149
Flag: com.android.settingslib.flags.settings_catalyst
Test: unit
Change-Id: I69a92a8029b94ca03d6232164edddf1a987201be
2024-12-19 10:13:19 +08:00
Angela Wang
7dfbf6c92e Merge "[Ambient Volume] Migrate to use AmbientVolumeUiController in SettingsLib" into main 2024-12-18 17:52:47 -08:00
Riley Jones
821bbb415d Merge "Cleanup of AccessibilityUtil#hasValueInSettings" into main 2024-12-18 12:04:56 -08:00
Graciela Putri
554684444a Merge "Clean up app default flag" into main 2024-12-18 05:38:14 -08:00
Roy Chou
b694a0afc9 Merge "feat(brightness suw): hide brightness preferences if restricted" into main 2024-12-18 00:21:45 -08:00
Roy Chou
79632a9fc5 feat(brightness suw): hide brightness preferences if restricted
By default if a RestrictedPreference is restricted then the preference
becomes disabled but still visible. But for brightness preferences in
A11y SUW we'd like to hide them if they're restricted and disabled,
since it's meaningless to show disabled items in SUW.

To achieve this, in PreferenceController#displayPreference we check the
whether the preference is RestrictedPreference and restricted, so we can
decide whether to hide it. Besides, if the preference is restricted and
we hide it, in PreferenceController#getAvailableStatis we also return
CONDITIONALLY_UNAVAILABLE to make consistency.

Bug: 384620216
Flag: com.android.settings.accessibility.add_brightness_settings_in_suw
Test: manually
      atest AutoBrightnessPreferenceControllerForSetupWizardTest
      atest BrightnessLevelPreferenceControllerForSetupWizardTest
Change-Id: Ifb68b4d64fc111d91a23457882a006002173d232
2024-12-18 07:05:45 +00:00
Treehugger Robot
c3fecca761 Merge "Remove old PK settings pages that are unused" into main 2024-12-17 19:50:54 -08:00
Adam Bookatz
49d3e34810 Expand uninstallForAll to Admins
Currently, user 0 can uninstall other users' apps. It really has that
ability by virtue of it being an Admin user. But non-user-0 Admins don't
currently have this ability, so we expand that here. This also allows
this ability on HSUM, where human Admin users aren't user 0.

Bug: 384514936
Test: manual confirmation that overflow appears on HSUM device
Test: atest SettingsSpaUnitTests:com.android.settings.spa.app.appinfo.AppInfoSettingsMoreOptionsTest
Flag: EXEMPT bugfix
Change-Id: I976bb63ecced3c128f8109c63c85067f4a0cdf9b
2024-12-17 13:47:19 -08:00
Riley Jones
178bdd4c60 Cleanup of AccessibilityUtil#hasValueInSettings
Settings should now be able to directly use the equivalent ShortcutUtils functions,
so the unnecessary code is being removed from AccessibilityUtil.
This does cause much behavior to depend on A11yManager instead of Settings.Secure,
so several tests need their conditions updated.

Test: atest com.android.settings.accessibility
Flag: EXEMPT internal refactoring
Bug: 367414968

Change-Id: I95f81f7d78b074def0fe2d1e01f60ceb7e142dac
2024-12-17 20:03:16 +00:00
Jacky Wang
23e5072732 Merge "Fix potential OOM caused by DataProcessManager" into main 2024-12-17 03:20:12 -08:00
Angela Wang
fb1efa69ac Merge changes from topics "ha-aics", "ha-aics-mute", "ha-local-data" into main
* changes:
  [Ambient Volume] Ambient volume icon
  [Ambient Volume] Show value with remote data
  [Ambient Volume] Show value with local data
  [Ambient Volume] UI of volume sliders in Settings
2024-12-17 01:17:38 -08:00
Jacky Wang
356fe97185 Fix potential OOM caused by DataProcessManager
The AsyncTasks started in DataProcessManager are not cancelled when
fragment is closed. Introduce helper class LifecycleAwareAsyncTask to
cancel AsyncTask automatically when lifecycle is stopped.

Bug: 384473507
Flag: EXEMPT bug fix
Test: Unit test & open/close battery usage screen 1000 times
Change-Id: I060f559fa85cc5feb9a42cb8dcc0581782a91d09
2024-12-17 17:17:15 +08:00
Yuchen Sun
d49cf23cf9 Merge changes from topic "AppDataUsage" into main
* changes:
  [Expressive design] Update AppDataUsage.
  [Expressive design] Rename ComposeMainSwitchPreference to ComposeGroupSectionPreference.
2024-12-17 00:05:34 -08:00
Angela Wang
fc79e74955 [Ambient Volume] Migrate to use AmbientVolumeUiController in SettingsLib
Moove the common ui logic code into settingslib for using in both
settings and systemui.

Flag: com.android.settingslib.flags.hearing_devices_ambient_volume_control
Bug: 357878944
Test: atest AmbientVolumePreferenceTest
Test: atest BluetoothDetailsAmbientVolumePreferenceControllerTest
Change-Id: I97d5ac2d1862fed7249af8b35f04fa36fc47d16d
2024-12-17 06:47:01 +00:00
Angela Wang
0724f2a811 [Ambient Volume] Ambient volume icon
1. Click on the icon on the header will mute/unmute the remote devices in the same set if the remote devices are both mutable.
2. Show different icon when the value of the volume slide bars changed.

Flag: com.android.settingslib.flags.hearing_devices_ambient_volume_control
Bug: 357878944
Test: atest AmbientVolumePreferenceTest
Test: atest BluetoothDetailsAmbientVolumePreferenceControllerTest
Change-Id: I829c5e08f1456c8ef9936d0314045dc8da37cd95
2024-12-17 06:46:59 +00:00
Daniel Huang
7b0e140dc5 Merge "Create language and region settings page" into main 2024-12-16 18:17:07 -08:00
Menghan Li
fe13deda24 Merge "fix(ReduceBrightColorsPreferenceController) Different feature configs" into main 2024-12-16 18:06:20 -08:00
Edgar Wang
a3677c7f6a Merge "Clean-up after com.android.settings.flags.revamp_toggles rollout" into main 2024-12-16 17:12:28 -08:00
Matthew DeVore
7b7f72d902 Merge "Show display topology in the pane" into main 2024-12-16 16:24:18 -08:00
Riley Jones
66dde6fea1 Merge "Cleaning up deprecated QS tooltip code" into main 2024-12-16 15:51:52 -08:00
Matthew DeVore
807cf78a51 Show display topology in the pane
Populate the topology pane with the topology as returned from
DisplayManager.

This adds padding but not the proper rounded corners or highlighting for
the blocks. That will come later, probably after feature complete while
still in dogfood.

Test: add and remove overlays while external display fragment is shown - verify pane is refreshed
Test: add two overlay displays, verify two blocks appear in pane with system wallpaper
Test: with no freeform window displays, verify a "not enabled" message appears in pane with no display blocks
Test: DisplayTopologyPreferenceTest
Flag: com.android.settings.flags.display_topology_pane_in_display_list
Bug: b/352648432
Change-Id: Ibb35af53c24d6feb1d763e4b2bf2ec9fee2ae24d
2024-12-16 19:04:58 +00:00
Angela Wang
46537a6576 [Ambient Volume] Show value with remote data
Sync local data with remote data when UI need to refresh and set the
corresponding local value to remote when the control expanded/collapsed.

Flag: com.android.settingslib.flags.hearing_devices_ambient_volume_control
Bug: 357878944
Test: atest BluetoothDetailsAmbientVolumePreferenceControllerTest
Change-Id: If748e696eb62b199d4fd9abafa2300d301a8079c
2024-12-16 15:26:26 +00:00
Angela Wang
c2ca7dadd9 [Ambient Volume] Show value with local data
Flag: com.android.settingslib.flags.hearing_devices_ambient_volume_control
Bug: 357878944
Test: atest BluetoothDetailsAmbientVolumePreferenceControllerTest
Change-Id: I3dad0f5424b44fee6d049fd778c4f8f71db0b58e
2024-12-16 15:24:20 +00:00
Angela Wang
0595aed386 [Ambient Volume] UI of volume sliders in Settings
Collapse/expand the controls when clicking on the hearder with arrow.

Flag: com.android.settingslib.flags.hearing_devices_ambient_volume_control
Bug: 357878944
Test: atest AmbientVolumePreferenceTest
Test: atest BluetoothDetailsAmbientVolumePreferenceControllerTest
Test: atest BluetoothDetailsHearingDeviceControllerTest

Change-Id: I845a4397601e563ed027d7d2a0a13651e95de708
2024-12-16 15:24:19 +00:00
Yuchen
c7635b1705 [Expressive design] Update AppDataUsage.
Migrate EntityHeader to IntroPReference.
Remove background of SpinnerPreference.

Bug: 349681531
Flag: EXEMPT migration
Test: atest AppDataUsageTest
Change-Id: Icb91c418a67489e3069f958356a9675f279ee5f8
2024-12-16 07:47:29 +00:00
danielwbhuang
f70abd2680 Create language and region settings page
1. Use flag to control the UI migration
2. Create language_and_region_settings.xml for new UI migration.

Bug: 379962955
Flag: com.android.settings.flags.regional_preferences_api_enabled
Test: check hsv and atest LanguagePreferenceControllerTest
Change-Id: If8d2303a2a3061231e69d1a45ad432c061da3545
2024-12-16 14:07:33 +08:00
SongFerng Wang
30192ba936 Disable failed tests from CellInfoUtilTest
These tests are currently failing and breaking builds.

Bug: 383858953
Change-Id: Idcb2f1f122b4e03990e7242b938438e1d8bb5367
Test: NA
Flag: EXEMPT bugfix
2024-12-15 19:38:54 -08:00
Treehugger Robot
6a5298ffbf Merge "Support GetMetadata for Preference Service" into main 2024-12-13 13:07:25 -08:00
Chris Antol
8927e4371d Support GetMetadata for Preference Service
Bug: 379750656
Flag: com.android.settingslib.flags.settings_catalyst
Test: unit test
Change-Id: Ia9b438360b60ff509a259df0a079ec4d745fb595
2024-12-13 19:50:21 +00:00
Treehugger Robot
dc30635bfb Merge "feat(HCT): Perform custom migration logic for existing HCT users" into main 2024-12-13 09:22:08 -08:00
Treehugger Robot
87a3d98b9e Merge "[Catalyst] Introduce a AccessibilitySeekBarPreference contains tool tip window" into main 2024-12-13 08:47:52 -08:00
Graciela Wissen Putri
8cf4dabb7c Clean up app default flag
Flag: EXEMPT clean up flag
Bug: 375291719
Test: atest UserAspectRatioManagerTest
Change-Id: I00cd2677aaca14f01f1a04b736151c74b97e3179
2024-12-13 14:40:34 +00:00
Sunny Shao
9777bbe38f [Catalyst] Introduce a AccessibilitySeekBarPreference contains tool tip window
Test: atest PreviewSizeSeekBarControllerTest TextReadingPreviewControllerTest
Bug: 372776688
Flag: com.android.settings.flags.catalyst_text_reading_screen
Change-Id: Ie93d2f26b1521e931ce648f0140894b153259f81
2024-12-13 22:15:39 +08:00
Menghan Li
2e10dc109f fix(ReduceBrightColorsPreferenceController) Different feature configs
This change updates the tests for ReduceBrightColorsPreferenceController
to account for different combinations of feature flags and
configurations, specifically related to the "Even Dimmer" flag and the
availability of Reduce Bright Colors.

The updated tests ensure that the preference controller correctly
determines its availability based on these factors, improving test
coverage and reliability. This addresses inconsistencies between the
code and test cases, ensuring accurate behavior across various device
configurations.

Bug: 383076111
Test: atest ReduceBrightColorsPreferenceControllerTest
Flag: com.android.server.display.feature.flags.even_dimmer
Change-Id: Iec53b416ec69a74f1f353f684358f265b022456f
2024-12-13 13:30:38 +00:00
Azhara Assanova
e2248f1c4f [AAPM] Add advanced protection dialog according to API feedback
This change also updates ActionDisabledByAdminDialog because the
AdvancedProtectionManager#createSupportIntent method is now static.

Bug: 378968840
Bug: 352420507
Test: ActionDisabledByAdminDialogTest
Test: WepNetworksPreferenceControllerTest
Test: manual
Flag: android.security.aapm_api
Change-Id: I8443742aadead45091fee757cbdf715d28eee495
2024-12-13 13:25:38 +00:00
Treehugger Robot
978bb419c4 Merge "Skip authentication if device was unlocked recently" into main 2024-12-13 03:32:50 -08:00
Yiyi Shen
ad6cee41b0 Merge "Avoid AudioManager#getMode in isFilterMatched" into main 2024-12-13 02:38:57 -08:00
Weng Su
e5d19b38cb Skip authentication if device was unlocked recently
- Sync the same behavior from SystemUI to Settings

Bug: 365611488
Flag: EXEMPT bugfix
Test: Manual testing
atest -c WifiNetworkDetailsFragmentTest \
         WifiDetailPreferenceController2Test \
         WifiTetherSSIDPreferenceControllerTest \
         com.android.settings.wifi.dpp.WifiDppUtilsTest
atest -c com.android.settings.spa.wifi.dpp.WifiDppUtilsTest

Change-Id: Ie3e8374b1fdbbc61e9e5bbf0f5162b18ba1452f3
2024-12-13 18:10:44 +08:00
Treehugger Robot
27c4fa1f41 Merge "Use BluetoothLeBroadcastAssistant#getSourceMetadata to retrieve broadcast name." into main 2024-12-13 01:51:46 -08:00
shaoweishen
06fe204a69 [Physical Keybaord] Add keyboard touchpad/Mouse page - part2
screenshot: https://screenshot.googleplex.com/A4yihXmkTTo2nM3.png

Add seperate controllers in page and guard with flag.
Original controller will be disabled if flag is off.

This is part of feature for keyboard setting update.
document: go/new-a11y-touchpad-mouse-page

Bug: 377602364
Test: atest SettingsRoboTests
Flag: com.android.settings.keyboard.keyboard_and_touchpad_a11y_new_page_enabled
Change-Id: I20bf7c65a7f9adc734c7382f23a92d1eb41822f1
2024-12-12 23:28:50 -08:00
chenjean
fe361a526e feat(HCT): Perform custom migration logic for existing HCT users
This logic is triggered by two scenarios:
(A) During first bootup after OTA update to Android 16, if the
    user had HCT enabled.
  - Trigger: ACTION_PRE_BOOT_COMPLETED.
  - Migration: HCT is disabled and notification is shown.
(B) Restore backup from Android 15 (or earlier), if the backup
    had HCT enabled and new device does not.
  - Trigger: SettingsProvider's restore process.
  - Migration: HCT is not restored and notification is shown.

We store whether the user has seen this notification in a new secure
setting ACCESSIBILITY_HCT_SHOW_PROMPT. This setting is also backed up.

Bug: 369906140
Flag: com.android.graphics.hwui.flags.high_contrast_text_small_text_rect
Test: atest SettingsRoboTests:com.android.settings.accessibility.HighContrastTextMigrationReceiverTest
Test: flash an incremental update on a build with HCT enabled;
      observe HCT is disabled and a notification is sent.
Test: flash an incremental update on a build with HCT disabled;
      observe no change to HCT and no notification.

Change-Id: I4d294ffc0b2eabc59ee7988a579d678975a16380
2024-12-13 05:01:33 +00:00
Matthew DeVore
2ad409ac2c Merge "Allow tweaking minimum block size and max block ratio" into main 2024-12-12 10:14:21 -08:00
Yiyi Shen
17018dd7e1 Avoid AudioManager#getMode in isFilterMatched
AudioManager#getMode is a slow binder call which should not be called on
UI thread. isFilterMatched will be frequently triggered on UI thread when updating the
Connected devices page.

Cache and update the audio mode when receive onModeChanged callback in
this change. For long term, we should better separate the UI/background
thread tasks in those classes. Also send request to Audio team to
improve the API latency.

Flag: EXEMPT small fix
Bug: 380993178
Test: atest
Change-Id: I054f3fa62f0fdf03b9a436a532ac1fb4738aaf58
2024-12-12 15:25:34 +08:00
chelseahao
18444f826f Use BluetoothLeBroadcastAssistant#getSourceMetadata to retrieve broadcast name.
Test: atest
Bug: 381944659
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: I6e4c83a0858717727066de708fbde88e4b03ed8e
2024-12-12 11:31:33 +08:00
Hani Kazmi
2ccbf1dbe9 Merge "[AAPM] UX for disabling WEP" into main 2024-12-11 09:05:58 -08:00