Commit Graph

22526 Commits

Author SHA1 Message Date
Alina Zaidi
9233fe7b46 Merge "[Dev option] Use DesktopModeStatus and ToggleOverride from wm/shell in Settings DesktopModePreferenceController" into main 2024-07-09 10:04:13 +00:00
Haijie Hong
2e3d477a3f Merge "Add ring indicator for battery level" into main 2024-07-09 08:44:48 +00:00
Yiling Chuang
419a6a9079 FRP bypass defense in App battery usage page
Before the setup flow completion, don't allow the app info page in App battery usage to be launched.

Bug: 327748846
Test: atest SettingsRoboTests + manual test
- factory reset + launch app battery usage app info via ADB during Setup -> verify app closes
Flag : EXEMPT bugfix

Change-Id: I486820ca2afecc02729a56a3c531fb931c1907d0
2024-07-09 08:13:49 +00:00
Matías Hernández
bb41777f87 Merge "Add mode: Choose name and icon for new custom modes" into main 2024-07-09 02:20:07 +00:00
Daniel Norman
0771fd8a9e Uses a custom state description for the Audio Balance seek bar.
This makes the seek bar more informative for a user of a screen reader
or other accessibility service. See context in b/319575109#comment7.

Bug: 319575109
Flag: com.android.settings.accessibility.audio_balance_state_description
Test: Use TalkBack to observe the state description while moving the
      seek bar.
Test: atest BalanceSeekBarTest
Change-Id: I7be15b26116f83854efe69d6b0560edde946daf5
2024-07-08 23:30:41 +00:00
Alina Zaidi
b456e84570 [Dev option] Use DesktopModeStatus and ToggleOverride from wm/shell in Settings DesktopModePreferenceController
Test: Added tests
Bug: 348193756
Flag: com.android.window.flags.show_desktop_windowing_dev_option
Change-Id: I0dc3c62df992a2454bd7c1fc239302489107ae59
2024-07-08 16:07:43 +00:00
Treehugger Robot
d12a36466d Merge "Fix test failures in deviceinfo" into main 2024-07-08 08:35:05 +00:00
Yiling Chuang
e24c5f37d2 Fix test failures in deviceinfo
Fixes: 315267179
Flag: EXEMPT bugfix
Test: atest SettingsRoboTests
Change-Id: I9858374fe101ee5908e16104ed7b4ca6af0308cd
2024-07-08 07:43:49 +00:00
Matías Hernández
574fcaf1b2 Add mode: Choose name and icon for new custom modes
This also unifies the "icon picker" screen with the new "add mode" screen since in both cases we want to edit name and icon together (and not save updates until the user confirms).

Bug: 326442408
Bug: 346278854
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I8a9d07ba0b6c55f3abc1b9884f278d51d178dc83
2024-07-06 22:12:58 +00:00
Matías Hernández
606f9b1727 Merge "Use a temporary summary in the "Apps that can interrupt" preference" into main 2024-07-06 10:42:23 +00:00
Matías Hernández
ec376bcfce Use a temporary summary in the "Apps that can interrupt" preference
We load the list of apps in a background thread, so getting that string later was causing the preference to increase in height, with an annoyingly noticeable animation. Having a placeholder test ensures this doesn't happen (and actually loading is pretty fast, so this text lkely won't even be visible).

Fixes: 347744856
Test: atest ZenModeAppsLinkPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: I4f9f60104fb8b0abbc7c4279b87daafac481e98a
2024-07-05 17:36:47 +02:00
Treehugger Robot
476323f0b0 Merge "Disable "Add network" if DISALLOW_ADD_WIFI_CONFIG" into main 2024-07-05 06:58:17 +00:00
Weng Su
a7b13c11cd Disable "Add network" if DISALLOW_ADD_WIFI_CONFIG
- When DISALLOW_ADD_WIFI_CONFIG is not restricted by Admin
  - Disable the preference directly

Bug: 335387874
Flag: EXEMPT bugfix
Test: Manual testing
atest -c AddWifiNetworkPreferenceTest

Change-Id: I0bb08656971107c73d7632a395a820d03723620b
2024-07-05 06:52:36 +08:00
YK Hung
8d5d69d62f Merge "Avoid dump BatteryReattributeDatabaseHist if the feature is disabled" into main 2024-07-04 06:12:53 +00:00
Haijie Hong
5d96249d6e Add ring indicator for battery level
Bug: 343317785
Test: atest AdvancedBluetoothDetailsHeaderControllerTest
Flag: com.android.settings.flags.enable_bluetooth_device_details_polish
Change-Id: Ib657db60be8d377ea990674c4d2438ea8a6854d0
2024-07-04 13:26:48 +08:00
YK Hung
e15e2397af Avoid dump BatteryReattributeDatabaseHist if the feature is disabled
Fix: 346706894
Fix: 350798552
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Flag: EXEMPT bug fix
Change-Id: I1670e2769bc71fe91a752efeea18074d53c5a017
2024-07-04 04:59:34 +00:00
Wilson Wu
2ae9ed0297 Merge "Clean up the keyboard vibration config" into main 2024-07-04 02:45:29 +00:00
Julia Reynolds
4fd34aa386 Create a new link preference for priority modes entry
Test: ZenModesSummaryHelperTest
Test: manual. Successfully search for both 'event' and 'priority'
Flag: android.app.modes_ui
Bug: 341726633
Change-Id: Ib7bd1a5c2f7b06b1728a66f7a9cef53cd45acc0b
2024-07-03 16:22:20 -04:00
Alina Zaidi
903976cd34 Merge "Update OWNERS for DesktopModePreferenceController" into main am: ed9bccb0b3 am: 7b4fcc6006
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3159736

Change-Id: Ibb60677d29ad574c106f95391f4572b0e142864b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-03 17:52:03 +00:00
Alina Zaidi
7b4fcc6006 Merge "Update OWNERS for DesktopModePreferenceController" into main am: ed9bccb0b3
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3159736

Change-Id: I79c2dd015ce63fa0fe658daf486971f48917f0ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-03 17:37:22 +00:00
Alina Zaidi
a059eabdb3 Update OWNERS for DesktopModePreferenceController
Change-Id: I446525a06480a27f80e530c65181fd31f43a9ef8
Test: N/A
Flag: EXEMPT Ownership cannot be flagged
2024-07-03 16:22:23 +00:00
Pawan Wagh
e1a69960f9 Merge "Fix flaky test for persistent notifications" into main am: b6fc7a6f58 am: fdd68f473b
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3156445

Change-Id: I0635a73774b0db08c401ef2523b2da13b0b359f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-03 15:47:26 +00:00
Pawan Wagh
fdd68f473b Merge "Fix flaky test for persistent notifications" into main am: b6fc7a6f58
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3156445

Change-Id: I0c2f3c0445e06e63a26cc69efa326c8ccabf0e66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-03 15:36:52 +00:00
Pawan Wagh
b6fc7a6f58 Merge "Fix flaky test for persistent notifications" into main 2024-07-03 15:14:25 +00:00
SongFerng Wang
5462789fae Merge "Fix AppBatteryPreferenceTest flaky" into main 2024-07-03 09:34:52 +00:00
Jayant Chowdhary
8569d2ade0 Merge "Exclude webcam and MIDI USB preferences from requiring auth challenge" into main 2024-07-03 04:55:58 +00:00
Treehugger Robot
a56866ddaa Merge "Add mandatory biometric prompt to platform surfaces (2/N)" into main 2024-07-03 02:39:11 +00:00
Julia Reynolds
ce4f2e9db6 Merge "Show bundles separately from other channels" into main 2024-07-03 00:02:33 +00:00
Pawan Wagh
999b8a9f33 Fix flaky test for persistent notifications
Persistent notifications test sometimes fails due
to setup activity doesn't exit due to failed intent.
Adding setup exit command when on device tests are starting and
adding timeout for transition.

Test: m Settings && adb install -r $ANDROID_PRODUCT_OUT/system_ext/priv-app/Settings/Settings.apk
Flag: EXEMPT bugfix
Bug: 349820489
Change-Id: Iaf1c1f481612367bbce919b27e89f88a24abb582
2024-07-02 23:57:57 +00:00
Chaohui Wang
6a6a263177 Fix AppBatteryPreferenceTest flaky
Bug: 350448913
Test: unit test
Merged-In: I5a1753835d2d47712ea249081c9a77c455eb3291
Change-Id: I5a1753835d2d47712ea249081c9a77c455eb3291
2024-07-02 23:28:49 +00:00
Diya Bera
606bfb3057 Add mandatory biometric prompt to platform surfaces (2/N)
1. Factory reset

Flag: android.hardware.biometrics.Flags.MANDATORY_BIOMETRICS
Bug: 339910718
Test: atest MainClearTest

Change-Id: I7216f991a2550197c520af860da67f8452cff323
2024-07-02 20:57:43 +00:00
Jayant Chowdhary
cf9eee0bb5 Exclude webcam and MIDI USB preferences from requiring auth challenge
Webcam / MIDI don't transfer any persistent data to the host device,
so it is okay to not guard it by an auth challenge. Auth challenge for
webcam use increases friction and reduces usability.

Bug: 349370229

Flag: com.android.settings.flags.exclude_webcam_auth_challenge

Test: Check when the flag is enabled, webcam / MIDI doesn't require auth
Test: Settings robolectric tests

Change-Id: Id4c97a635a4c0a9ed14f88fbdda2743e2371dd10
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2024-07-02 18:36:51 +00:00
Matías Hernández
0037dfe9a9 Merge changes from topics "add-mode-dialog", "nicer-icon-header" into main
* changes:
  Icon picker: Styling improvements
  Add mode: Support for app-provided modes
2024-07-02 12:26:42 +00:00
Treehugger Robot
c2c6c5d058 Merge "Update the conditions of power plugged determination." into main 2024-07-02 11:56:53 +00:00
Yiling Chuang
318636d51b Update the conditions of power plugged determination.
Under charging optimization mode, use ADAPTIVE_LONGLIFE as the additional condition to check whether a device is plugged.

Bug: 349949603
Flag: EXEMPT bugfix
Test: atest SettingsRoboTests
Change-Id: Idbdfaaa1d5c54be325b6182bcda81d4282c21ba0
2024-07-02 10:54:36 +00:00
Matías Hernández
45f1e819d3 Icon picker: Styling improvements
Instead of a the plain appearance of a EntityHeaderController, make the top icon bigger and use the same circled style as the choices in the list. Also highlight the current icon in the list as selected, even if it is the default for the mode type.

Also cleaned up controllers that don't need a ZenModesBackend to not receive it.

(Both of these changes also line up with the "new mode" fragment that is incoming).

Bug: 333901673
Bug: 326442408
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I0c9f3e34019a1a6c48658933dde545ad8d7399ae
2024-07-02 12:12:02 +02:00
Matías Hernández
2639c19474 Add mode: Support for app-provided modes
(This completes the add-mode flow except for the choose-a-name-and-icon step for custom modes).

Bug: 326442408
Flag: android.app.modes_ui
Test: atest com.android.settings.notification.modes
Change-Id: I7aceec01ed54d804bcac53d932277c243c1f81bf
2024-07-02 12:09:40 +02:00
Treehugger Robot
62db4b3a4d Merge "Add mandatory biometric prompt to platform surfaces (1/N)" into main 2024-07-02 02:50:08 +00:00
Diya Bera
049de84f2d Add mandatory biometric prompt to platform surfaces (1/N)
1. Face settings
2. Fingerprint settings
3. Change device credential

Flag: android.hardware.biometrics.Flags.MANDATORY_BIOMETRICS
Bug: 339910718
Test: atest UtilsTest

Change-Id: I69778d1733ea9fb312e7c26ae0fa23b6008dde5d
2024-07-01 21:35:19 +00:00
Alina Zaidi
50e0a53b1c Merge "[Dev option] Add a dev option to enable DW." into main 2024-07-01 19:54:09 +00:00
Riley Jones
8f313621aa Refactoring Accessibility settings to use ShortcutConstants.UserShortcutType
This removes AccessibilityUtil.UserShortcutType,
replacing all mention of it with ShortcutConstants.UserShortcutType

NO_IFTTT=UI order not changed
Test: atest com.android.settings.accessibility
Bug: 322014084
Flag: EXEMPT internal refactoring

Change-Id: I18695d040c4bd08a455143594e770adda2b1a8de
2024-07-01 19:42:32 +00:00
Alina Zaidi
d98058c4b7 [Dev option] Add a dev option to enable DW.
Default value of this dev options solely depends on
enable_desktop_windowing_mode, which is intended

Toggle is shown only if DW is eligible on device

Currently this option only overrides features guarded by
enable_desktop_windowing_mode, later on it will be used to override a
few other DW features

Test: Added tests. Locally tested CUJs
Bug: 348186127
Bug: 348193756
Flag: com.android.window.flags.show_desktop_windowing_dev_option

Change-Id: I1c1f946b586a5ca0440b29879925ba1a624717aa
2024-07-01 17:23:20 +00:00
Julia Reynolds
2956baaf51 Show bundles separately from other channels
Fixes: 346612561
Test: BundleListPreferenceControllerTest
Flag: android.service.notification.notification_classification
Change-Id: I2371219822f6a777788147e8249ca1e3b29d40ba
2024-07-01 12:56:41 -04:00
Yuri Lin
3731d3e8ee Merge "Link to app-provided configuration intent for app-owned rules." into main 2024-07-01 16:22:16 +00:00
Yuri Lin
21539cd2be Link to app-provided configuration intent for app-owned rules.
If there is no valid intent, the automatic trigger preference is disabled.

Flag: android.app.modes_ui
Bug: 341961712
Test: manual (for Bedtime & Driving modes), ZenModeSetTriggerLinkPreferenceControllerTest

Change-Id: I673792effb3cfdcaaa7cf85adfb55a93b44dcc86
2024-07-01 14:50:35 +00:00
mxyyiyi
a954e914dd Add a flag to protect overwrite app optimization mode to restricted mode.
- Skip set app optimization mode to restricted if the flag disabled.

Bug: 348192536
Fix: 348192536
Test: atest
Flag: EXEMPT bug fix
Change-Id: I92d320ce1edfe9b7044afdcd058651b0d54bd6bd
2024-07-01 17:38:50 +08:00
SongFerng Wang
183a191cbf Merge "Add condition for askEveryTime of SMS at Primary Sim" into main 2024-07-01 08:01:50 +00:00
Yiyi Shen
07a346fcf5 Fix dup preference key on Connected devices page
Use different key (prefix + CacheBluetooothDevice hash) for
each BluetoothDevicePreference to avoid Java crash due to "Two different
ViewHolders have the same change ID".

Test: atest
Fix: 325831741
Flag: EXEMPT safe fix only change preference key string
Change-Id: Ic993f3cab206b794045c2f46e6b4b376bfa3adea
2024-07-01 15:32:34 +08:00
Wilson Wu
789aacf499 Clean up the keyboard vibration config
-. Remove the device config in Settings
-. Use the new config in frameworks/base

Flag: EXEMPT refactor
Bug: 332661307
Test: atest KeyboardVibrationTogglePreferenceControllerTest
Change-Id: I2fe70d830d55ec6f33597fbe0ed107b41eb3bdd7
2024-07-01 03:09:56 +00:00
Kyle Zhang
febb0822a0 Merge "Keep FakeFeatureFlagsImpl" into main 2024-06-28 05:25:10 +00:00