Commit Graph

22494 Commits

Author SHA1 Message Date
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
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
Chaohui Wang
d101f2d154 Merge "Clean up MobileNetworkInfoEntity unused fields" into main 2024-06-28 05:18:07 +00:00
songferngwang
1892d20ce8 Add condition for askEveryTime of SMS at Primary Sim
Using the config_sms_ask_every_time_support control the askEveryTime

Bug: 349169874
Test: atest PrimarySimRepositoryTest
Flag: EXEMPT bugfix

Change-Id: Ida82ed3a6b5264f8d8c5997584e9fd27f25bf09f
2024-06-28 05:17:38 +00:00
Chaohui Wang
6afb2f3006 Merge "Not use SubscriptionInfoEntity in DataUsageList" into main 2024-06-28 05:14:06 +00:00
Chaohui Wang
e25c208277 Merge "Migrate SearchFeatureProviderImpl to Kotlin" into main 2024-06-28 02:39:20 +00:00
Pajace Chen
b83151f324 Merge "[Bug Fix] "Dock defend string and tips in settings are incorrectly" issue" into main 2024-06-28 00:39:12 +00:00
Treehugger Robot
bdd205e1b4 Merge "fix TrustAgentsPreferenceControllerTest" into main 2024-06-27 20:15:46 +00:00
Billy Huang
dd0ae72eb9 fix TrustAgentsPreferenceControllerTest
Removed non-platform Robolectric shadow in favor of setting up fake
package/services directly with ShadowApplicationPackageManager.

Bug: 313612480
Test: atest "SettingsRoboTests:TrustAgentsPreferenceControllerTest" --host
Flag: TEST_ONLY
Change-Id: Iadcb5bcb977201e2f394b699621bfb34657a7820
2024-06-27 19:21:22 +00:00
Yuri Lin
978cba142a Merge "Migrate "duration for quick settings" to new modes page." into main 2024-06-27 18:22:39 +00:00
Yuri Lin
c1a4abbc51 Migrate "duration for quick settings" to new modes page.
This mostly continues to use the existing dialogs in settingslib (ZenDurationDialog, SettingsEnableZenModeDialog) and creates a controller to read from the settings value.

Also updates the "turn on / turn off" button to respect the preferred duration.

Flag: android.app.modes_ui
Bug: 343444249
Test: ZenModeButtonPreferenceControllerTest, ManualDurationPreferenceControllerTest
Change-Id: I2fd49a79d9a5807fefdd7ec310a6cc60d70f9bb1
2024-06-27 12:48:27 -04:00
pajacechen
daeb06c3b0 [Bug Fix] "Dock defend string and tips in settings are incorrectly" issue
Symptom: After the dock defend was triggered, the battery tips still
show "Future-Bypass" dock defend mode. It should be the "Active" dock
defend mode.

Root Cause: The original `BatteryInfo.isBatteryDefender` was implemented
by using `longlife`, due to the charging limit also reuse `longlife`
issue, we replace the implementation of `BatteryInfo.isBatteryDefender`
with HAL API call `isTempDefend` and `isDwellDefend`. However, the
dock defend also needs `longlife`, the original
`BatteryInfo.isBatteryDefender`. So the dock defend checking failed
after replacing the implementation of `BatteryInfo.isBatteryDefender`

Solution:
- Add new property isLonglife in BatteryInfo
- Replace all isBatteryDefender reference that needs isLonglife

Bug: 348563863
Test: Manual Test and robotest
Test: http://ab/I08300010291126076 (unit test)
Test: http://ab/I67800010291096764 (robo test)
Flag: EXEMPT bugfix
Change-Id: I58424927522acc29dc49261a2c24829a5b34ef85
2024-06-27 23:19:08 +08:00
Chaohui Wang
75a382fc46 Migrate SearchFeatureProviderImpl to Kotlin
This is no-op.

Bug: 346776183
Flag: EXEMPT refactor
Test: manual - do settings search
Change-Id: I5c113f6ed5db1401e1d237f0022ab6dccde8d060
2024-06-27 14:11:02 +00:00
Chaohui Wang
03e9188830 Merge "Export SpaDestination.startFromExportedActivity" into main 2024-06-27 14:09:42 +00:00
Chelsea Hao
94cfea7ed1 Merge "[Audiosharing] onDestroy() is not guaranteed to be called after stopSelf(). In this case callbacks are not unregistered timely and the notification kept being brought up again if any callback is received." into main 2024-06-27 11:13:13 +00:00
Yiyi Shen
9c5ac400a0 Merge "[Audiosharing] Fix IllegalStateException at getChildFragmentManager" into main 2024-06-27 10:53:15 +00:00
chelseahao
c49658d154 [Audiosharing] onDestroy() is not guaranteed to be called after stopSelf(). In this case callbacks are not unregistered timely and the notification kept being brought up again if any callback is received.
This CL also moved some binder calls to bg thread.

Test: atest -c com.android.settings.connecteddevice.audiosharing.audiostream
Flag: com.android.settingslib.flags.enable_le_audio_qr_code_private_broadcast_sharing
Bug: 347605485
Change-Id: I1a3a3db88178a43f27cac74cf743bdb75cdfb60e
2024-06-27 09:57:37 +00:00
Chaohui Wang
b8ad25f8bd Clean up MobileNetworkInfoEntity unused fields
It's safe since MobileNetworkDatabase is in memory only.

Bug: 348118234
Flag: EXEMPT clean up
Test: manual - check Mobile Settings
Change-Id: I25141a87b9afb42b85d73cbcd7307b899b3f0a3b
2024-06-27 17:30:19 +08:00
Kyle Zhang
7dbe6517ec Keep FakeFeatureFlagsImpl
* Keep FakeFeatureFlagsImpl.
* Use EnableFlags and DisableFlags annotation
* Switch back from `assumeTrue` to `assert` when flag is enabled or disabled.
* Remove flag rollback test.

Bug: 342830919
Change-Id: Ic9b3438f3f0e31e64d5405ed81903b352195714a
2024-06-27 08:46:17 +00:00
Chelsea Hao
f647356d62 Merge "[Audiosharing] Increase test coverage." into main 2024-06-27 08:36:02 +00:00
chelseahao
7529e1bea7 [Audiosharing] Increase test coverage.
Test: atest -c com.android.settings.connecteddevice.audiosharing.audiostream
Flag: com.android.settingslib.flags.enable_le_audio_qr_code_private_broadcast_sharing
Bug: 345686602
Change-Id: I668df463ec1c6e994d2dcaa363a20aa06f69f199
2024-06-27 07:11:37 +00:00
Chaohui Wang
7ef8b0c518 Export SpaDestination.startFromExportedActivity
To be called from other exported activity in the future.

Bug: 346776183
Flag: EXEMPT refactor
Test: adb shell am start \
          -a android.settings.REQUEST_MEDIA_ROUTING_CONTROL
Test: unit test
Change-Id: Ica105ab3b56d33e4cd2fe1bb1c1218ef2f219ab3
2024-06-27 14:16:58 +08:00
Roy Chou
5d5392d48e Merge "chore(onefingerpan): update onefingerpan preference summary and magnification settings page footer description" into main 2024-06-27 01:11:31 +00:00
Priyanka Advani
e200279002 Merge "Revert "Fix "Dock defend string and tips in settings are incorrectly" issue"" into main 2024-06-26 20:42:45 +00:00
Chaitanya Cheemala
4cfc0d8156 Revert "Fix "Dock defend string and tips in settings are incorrectly" issue"
This reverts commit d1114107df.

Reason for revert: Likely culprit for b/349578829  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: I905a439c73e120efa094f097d59f68d0bedb0648
2024-06-26 15:47:11 +00:00
Julia Reynolds
aec909bd44 Merge "Move 'show hidden channels' option" into main 2024-06-26 13:30:48 +00:00
Matías Hernández
3df9e97f77 Merge "Changes to icon picker for reusability in "add mode" flow" into main 2024-06-26 11:40:21 +00:00
YK Hung
38f3171f56 Merge "Fix "Dock defend string and tips in settings are incorrectly" issue" into main 2024-06-26 11:11:11 +00:00
YK Hung
59f9bd0630 Merge "Fetch package uid under the corresponding user handle." into main 2024-06-26 11:10:40 +00:00
Yiyi Shen
6e6df5d6e2 [Audiosharing] Fix IllegalStateException at getChildFragmentManager
Fix: 349300412
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: I33a22ce12ae4c602be9aafdbd9cf9fdcee82bdde
2024-06-26 18:17:46 +08:00
Matías Hernández
c2d2de085d Changes to icon picker for reusability in "add mode" flow
* Don't finish the fragment from the controller (ugh!) instead just report the selected icon via a listener.
* Highlight the selected icon in the list.
* Cache the icon drawables (since we're using selectors for the colors, we don't need to swap them, one per icon resource id is enough).
* Improved the tests a bit too.

Bug: 333901673
Bug: 326442408
Test: ates
Flag: android.app.modes_ui
Change-Id: Ib2ec7a7e3ed99b13f9264aa6f7c209ee3f6967a0
2024-06-26 11:38:56 +02:00
Xinyi Mao
ede7f73f20 Merge "Skip load app name from PackageManager while init the BatteryEntry." into main 2024-06-26 09:05:09 +00:00
mxyyiyi
7ff146a34a Fetch package uid under the corresponding user handle.
- Make 3p-app usage entry under work profile selectable:
[Before] https://screenshot.googleplex.com/AuD3Q8hrepmxaoS
[After]  https://screenshot.googleplex.com/ACrXLcV2RYYv9aA

Bug: 346982931
Fix: 346982931
Test: atest BatteryDiffEntryTest
Flag: EXEMPT bug fix
Change-Id: Ib54df4c6d343dd32057e741b448596357ec2c12f
2024-06-26 17:03:29 +08:00
Chaohui Wang
a0badd0456 Merge changes I51395a55,I63a86569 into main
* changes:
  Fix unable to erase eSIM
  SubscriptionRepository.activeSubscriptionIdListFlow
2024-06-26 08:59:07 +00:00