Commit Graph

22475 Commits

Author SHA1 Message Date
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
pajacechen
d1114107df 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

Bug: 348563863
Test: Manual Test and robotest
Test: http://ab/I55100010289930405
Flag: EXEMPT bugfix
Change-Id: I180cde7a193d75243893471634bab5f354c1623b
2024-06-26 16:38:14 +08:00
YK Hung
ad1fa9b0b5 Merge "Reattribute data into other apps as the final result (4/5)" into main 2024-06-26 07:54:06 +00:00
mxyyiyi
13988cec01 Skip load app name from PackageManager while init the BatteryEntry.
- getApplicationLabel is time-consuming.
[Before]
https://pprof.corp.google.com/?id=bade2601da25f6169b0685a3e2a3e5cc
https://screenshot.googleplex.com/86R5DhMgcyQakys
[After]
https://pprof.corp.google.com/?id=2ccb1e88222e96db1fbcc072470a254c
https://screenshot.googleplex.com/7QviDFSpgzoQcg6

Bug: 349120408
Fix: 349120408
Test: atest + pprof
Flag: EXEMPT bug fix
Change-Id: I1eed60cea9c5bd3f77f38993f7d04906aa811da5
2024-06-26 15:49:30 +08:00
Yiyi Shen
832c751e29 Merge "[Audiosharing] Avoid start sharing dialog for single device." into main 2024-06-26 06:29:07 +00:00
YK Hung
bc93a6a146 Reattribute data into other apps as the final result (4/5)
Bug: 346706894
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Flag: EXEMPT bug fix
Change-Id: I8b8a988df2718b64cd752915205db687ffe9d559
2024-06-26 06:25:15 +00:00
Chaohui Wang
af56a3ea21 Not use SubscriptionInfoEntity in DataUsageList
Carrier id will be get in DataUsageListAppsController async.

Bug: 348118234
Flag: EXEMPT clean up
Test: manual - on DataUsageList
Change-Id: I06b361f38d04c5020431cd8c6e359aa3a69942e5
2024-06-26 11:58:07 +08:00
Roy Chou
b0220d8878 Merge "chore(brightness suw): adjust auto brightness detail page footer content description" into main 2024-06-26 03:51:47 +00:00
Chaohui Wang
b70c805717 Fix unable to erase eSIM
Before this change,
- eSIM will be erased twice, one with result callback and one without
  result callback.
- During reset, ResetNetworkConfirm could interrupted by subscription
  invalid event, which happens during reset.

After this change,
- eSIM will be erased only once, result callback is registered
  separately.
- Explicit exit the page when reset finish, and ignore the subscription
  invalid event after reset started.

Bug: 328293508
Flag: EXEMPT bug fix
Test: manual - dry run the reset
Test: ResetNetworkConfirmTest
Change-Id: I51395a556b1c8775192d5897a87f13046c042578
2024-06-26 11:02:56 +08:00
Chaohui Wang
edc72a9b0f SubscriptionRepository.activeSubscriptionIdListFlow
Bug: 328293508
Flag: EXEMPT refactor
Test: manual - on Mobile Settings
Test: unit test
Change-Id: I63a86569f4fa3a27bd38d9853f6141890d26b881
2024-06-26 10:55:59 +08:00
Angela Wang
69f686828b Merge changes from topic "ha-preset-unavailable" into main
* changes:
  Remove unavailable preset info option
  Show message when no preset info is obtained from the remote device
2024-06-26 02:48:19 +00:00
Joshua Mccloskey
2d0638c76b Merge "Revert "Restart fingerprint auth on cancel."" into main 2024-06-26 00:09:29 +00:00
Joshua Mccloskey
16f973b836 Revert "Restart fingerprint auth on cancel."
This reverts commit 4efd4c16f9.

Reason for revert: Breaks auth behavior

Fixes: 347858844

Change-Id: Ie1b8be9dfae2cba7e2b37187f08cf1360aedf29f
2024-06-25 21:35:00 +00:00
Julia Reynolds
477ebd25f2 Move 'show hidden channels' option
Make it more prominent to make it more clear what's happening
when you unblock an app

Test: DeletedChannelsPreferenceControllerTest
Test: ShowMorePreferenceControllerTest
Flag: com.android.server.notification.notification_hide_unused_channels
Bug: 322536537
Change-Id: I745b2037b4dc907a4307fa7f70ecc3a4c9db2dd2
2024-06-25 20:50:28 +00:00
Treehugger Robot
40b6a49287 Merge "Adjust strings in modes list to match latest mocks" into main 2024-06-25 16:07:07 +00:00
Oleg Blinnikov
b3926bdf35 Merge "Added External Display settings page" into main 2024-06-25 15:01:01 +00:00
Matías Hernández
7fb0c3308e Adjust strings in modes list to match latest mocks
Bug: 346575288
Test: atest ZenModesListItemPreferenceTest
Flag: android.app.modes_ui
Change-Id: Ibe9c049ed0fb3b1838866b923a6227d67885c75c
2024-06-25 16:48:31 +02:00
Roy Chou
2f1a7d6155 chore(onefingerpan): update onefingerpan preference summary and magnification settings page footer description
Based on b/338409557#comment5, we update the onefingerpan toggle's
summary, and make the magnification settings page's footer HTML
description be dynamic based on one finger panning preference state.

Bug: 338409557
Flag: com.android.server.accessibility.enable_magnification_one_finger_panning_gesture
Test: manually
      atest MagnificationOneFingerPanningPreferenceControllerTest
      atest ToggleScreenMagnificationPreferenceFragmentTest
      atest ToggleFeaturePreferenceFragmentTest
Change-Id: I817cad4fb0c034bcd2db0485ca27c30ea88a0280
2024-06-25 14:22:27 +00:00
Pat Manning
d303afbbd7 Add Settings for vector-specific PointerIcon scale.
Bug: 305193969
Test: PointerScaleSeekBarControllerTest
Flag: com.android.systemui.enable_vector_cursor_a11y_settings
Change-Id: I2f344f1d5fc6d5c8eb7159570287b8ce6f9ac070
2024-06-25 13:55:59 +00:00
Oleg Blinnikov
a6016e6552 Added External Display settings page
Settings page to show rotation, resolution,
enable/disable display settings for
external and overlay displays. In case
persist.demo.userrotation.package_name
sysprop is set, then the virtual
display with this will also be shown.

In case there is only one allowed display
available, then this display will be
shown right away. When there are more
than 1 displays available, then the list
of displays will be shown.

Change-Id: I186667aaba94ed6befec3a98f4a87f2b2d1f1859
Test: atest ExternalDisplayUpdaterTest
Test: atest ExternalDisplayPreferenceFragmentTest
Test: atest ResolutionPreferenceFragmentTest
Test: atest ConnectedDeviceGroupControllerTest
Bug: 340218151
Bug: 294015706
Bug: 253296253
Flag: com.android.settings.flags.rotation_connected_display_setting
Flag: com.android.settings.flags.resolution_and_enable_connected_display_setting
2024-06-25 13:41:10 +00:00