Commit Graph

22494 Commits

Author SHA1 Message Date
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
Tetiana Meronyk
ca90cf1fbe Merge changes Ie07816b7,I1b5aeeee,Id9d50703 into main
* changes:
  Show disabled add actions in COPE mode
  Add handling of admin enforced restrictions in Users Settings
  Refactor multiuser toggle to control user switch feature
2024-06-25 12:49:25 +00:00
Yiyi Shen
f9424c6231 [Audiosharing] Avoid start sharing dialog for single device.
Issue - for LEA device with two BT addresses, when the second bud connected with
incorrect group id, we wrongly show up the start audio sharing dialog.

Fix - check there are two connected LEA valid groups before show up
start audio sharing dialog.

Bug: 347655885
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: Icd86ce2cfa4312c10c14906f46df324357c56990
2024-06-25 18:11:02 +08:00
Angela Wang
2b78c17e84 Remove unavailable preset info option
Bug: 347134589
Test: atest BluetoothDetailsHearingAidsPresetsControllerTest
Flag: EXEMPT bugfix
Change-Id: Iabdbe675a08fcd172617ef31dd0b8fbe8dccbb89
2024-06-25 09:36:52 +00:00
Chelsea Hao
06feb6d1f7 Merge "[Audiosharing] Test getInstance for states" into main 2024-06-25 07:52:35 +00:00
chelseahao
954d027917 [Audiosharing] Test getInstance for states
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: Ic0f143b427966dfa039fca3bd0028e0c6f7382ab
2024-06-25 14:29:19 +08:00
Julien Desprez
e4087bf29f Enable 16kb tests on general-tests suite
This doesn't need to be built on device side.

Flag: TEST_ONLY
Test: https://android-build.corp.google.com/builds/abtd/run/L50300030004790194
Bug: 342232954

Change-Id: I86493e8d197ca6acc24743e44b63a764bf4d36df
2024-06-25 02:56:04 +00:00
Tetiana Meronyk
25e1b4d88b Show disabled add actions in COPE mode
Before this change these actions were hidden.

After this change, they are displayed but disabled which makes it more intuitive.

Bug: 336762423
Test: atest UserSettingsTest && atest UserDetailsSettingsTest
Flag: android.multiuser.new_multiuser_settings_ux
Change-Id: Ie07816b7d3817d12e78e1ec2692fcddea9328933
2024-06-24 21:28:57 +00:00
Tetiana Meronyk
0f311e1195 Add handling of admin enforced restrictions in Users Settings
Before, when the restrictions were applied, the preferences that were restricted were hidden.

After this change, if admin applies a restriction, the preference is displayed as disabled and Policy Transparency Dialog is displayed

Bug: 338226475
Test: atest UserSettingsTest && atest UserDetailsSettingsTest
Flag: android.multiuser.new_multiuser_settings_ux
Change-Id: I1b5aeeeec7accde278ff3e46ea3d64c91d8400db
2024-06-24 20:22:16 +00:00
Tetiana Meronyk
caef61b5eb Refactor multiuser toggle to control user switch feature
The  name  "Allow multiple users" is too ambiguous. It sounds like by toggling it off, the feature is completely disabled. In fact, it only hides user switcher. In conjunction with hiding other users from the list, it makes it appear as all the users get deleted when the toggle is off. On the contrary, users might be running in background when the toggle is off.

After this change, the new name better represents the intention behind this toggle, as well as makes the UI more intuitive. The users are not being hidden anymore. But switching preference gets disabled.

Since the toggle can only be enabled or disabled by owner (after this refactoring), it means that Owner has full control over multiuser settings and is able to perform actions on users without having to enable the toggle.

Bug: 336762423
Test: atest UserSettingsTest && atest UserDetailsSettingsTest
Flag: android.multiuser.new_multiuser_settings_ux
Change-Id: Id9d507039b58d3df66fe78710409716fd4816890
2024-06-24 18:58:01 +00:00
Matías Hernández
bcc608fbb2 Style priority modes items in aggregator
* Different color if active.
* Trigger description / "ON" / "Paused" / "Tap to set up" depending on enabled and active status (strings may be revised later).

This CL also adds a helper class to create ZenModes, reducing boilerplate in unit tests.

Bug: 346575288
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: Ia0e16b8be5284d13bed4366cbee0f92748bf2f85
2024-06-24 11:56:11 +02:00
Chelsea Hao
3cac411486 Merge changes I9036e560,Ieb735d39,Ia78b1fe1,I91d9a45a into main
* changes:
  [Audiosharing] Created test for the name and password preferences.
  [Audiosharing] Created test for the main controller.
  [Audiosharing] Listen to `onProfileConnectionStateChanged` of LE_AUDIO_BROADCAST_ASSISTANT to be more precise on device connection status upon bluetooth on/off. Also increase test coverage.
  [Audiosharing] Increase test coverage for audio stream states.
2024-06-24 08:02:55 +00:00
chelseahao
4afef7eed1 [Audiosharing] Created test for the name and password preferences.
Test: atest -c com.android.settings.connecteddevice.audiosharing
Flag: com.android.settingslib.flags.enable_le_audio_qr_code_private_broadcast_sharing
Bug: 345686602
Change-Id: I9036e560e29aba9555c207dce1b2018be010bca8
2024-06-24 14:36:08 +08:00
Roy Chou
e8288512ee chore(brightness suw): adjust auto brightness detail page footer content description
Ref to the bug, s2s and talkback pages' footer content descriptions are
prefixed with "About XXX" for talkbalk info announcement. Therefore, for
auto brightness detail page in SUW, we also prefix "About adaptive
brightness" to the footer preference content description, to improve
the consistency with other accessiblity feature suw pages.

Bug: 347859318
Flag: com.android.settings.accessibility.add_brightness_settings_in_suw
Test: manually
      atest AutoBrightnessPreferenceFragmentForSetupWizardTest
Change-Id: Ieda4bcffb4f4e11ea68c961beee5c2fff1b29f2c
2024-06-24 06:10:07 +00:00
Chaohui Wang
0bd8a5d232 Merge "Use wifiCallingReadyFlow in WifiCallingSettingsForSub" into main 2024-06-24 02:09:16 +00:00
Ioana Alexandru
b67c157e2f Merge "Move ZenModesBackend to SettingsLib." into main 2024-06-21 16:50:27 +00:00
Ioana Alexandru
b1dad7d5b4 Move ZenModesBackend to SettingsLib.
This will allow us to access it from SystemUI.

Bug: 346519570
Test: builds
Flag: EXEMPT trivial refactor
Change-Id: I5bc480bd4eb0cbf8a26989dd11c064e66e5ee70e
2024-06-21 15:19:11 +02:00
Julia Reynolds
92024e1afc Merge "Migrate Settings intents" into main 2024-06-21 13:06:10 +00:00
Chaohui Wang
562f56bb7a Use wifiCallingReadyFlow in WifiCallingSettingsForSub
Simply and unify the logic, and fixed a crash.

Fix: 348372605
Flag: EXEMPT bug fix
Test: manual on Wi-Fi calling
Change-Id: Idc7dff934323fbebb09137bbd0585575e65a7867
2024-06-21 16:53:38 +08:00
chelseahao
e0abdc5c7a [Audiosharing] Created test for the main controller.
Test: atest -c com.android.settings.connecteddevice.audiosharing.audiostreams
Flag: com.android.settingslib.flags.enable_le_audio_qr_code_private_broadcast_sharing
Bug: 345686602
Change-Id: Ieb735d392607c131c213be90cd72c4b7a9ed958d
2024-06-21 14:34:39 +08:00
chelseahao
44a0b59ad2 [Audiosharing] Listen to onProfileConnectionStateChanged of LE_AUDIO_BROADCAST_ASSISTANT to be more precise on device connection status upon bluetooth on/off. Also increase test coverage.
Test: atest -c com.android.settings.connecteddevice.audiosharing.audiostreams
Flag: com.android.settingslib.flags.enable_le_audio_qr_code_private_broadcast_sharing
Bug: 345686602
Change-Id: Ia78b1fe19bff3cb179794db1dc09374db13818d8
2024-06-21 14:14:45 +08:00
Chaohui Wang
cfd401b04e Fix crash in RoamingPreferenceController
With new MobileDataRepository.isDataRoamingEnabledFlow() to provide
the data instead of MobileNetworkRepository.

Fix: 347224962
Flag: EXEMPT bug fix
Test: manual on Mobile Settings
Test: unit test
Change-Id: I2a994cb11c93296fb46558f566d6d4467ba4c846
2024-06-21 04:39:44 +00:00
Chaohui Wang
ef12f1ddb5 New CarrierConfigRepository
Benefices,
- Gets the configuration values of the specified keys, for better
  performance
- Check key suffix for correctness
- Support cache
- If CarrierConfigManager throw exception, use default value

Bug: 337417520
Flag: EXEMPT refactor
Test: manual on Sim Status
Test: unit
Change-Id: I68f41ef66d495080f628794ade63cf807efba619
2024-06-21 04:39:24 +00:00
chelseahao
4b85389124 [Audiosharing] Increase test coverage for audio stream states.
Test: atest -c com.android.settings.connecteddevice.audiosharing.audiostreams
Flag: com.android.settingslib.flags.enable_le_audio_qr_code_private_broadcast_sharing
Bug: 345686602
Change-Id: I91d9a45abd4c9659c9d0ddeca5f5aaefed36f820
2024-06-21 11:00:54 +08:00
Chaohui Wang
ad93026e3b Fix Apn network type tests
Bug: 347114536
Test: unit test
Change-Id: Ib5bd331e9a28e89e426bf423e6086d1c2d288961
Merged-In: Ib5bd331e9a28e89e426bf423e6086d1c2d288961
(cherry picked from commit 288b40ee4f)
2024-06-21 01:52:18 +00:00
Chun-Ku Lin
764f8d73a4 Don't show the QuickSetting tooltip when we stopped auto add qs tile for
the user

Bug: 348110750
Test: atest ReduceBrightColorsPreferenceControllerTest
Test: manual
- Go to Settings > Accessibility
- Turn on Extra dim for the first time
- Verify the QS tooltip prompt doesn't show up
Flag: android.view.accessibility.a11y_qs_shortcut

Change-Id: I6fecb818df3bb865ba81cbcda94149a98d8255ab
2024-06-20 23:36:03 +00:00
Julia Reynolds
dea5102c44 Migrate Settings intents
to our new modes ui

Fixes: 333909883
Test: manual - created test app that launches each intent, launched each
with flag on and flag off
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui

Change-Id: I8259b554fe34b453880890c667165547033ccd06
2024-06-20 12:48:40 -04:00
Angela Wang
9a8b50baea Show message when no preset info is obtained from the remote device
Display message when hearing aid has no presets configured. Previously, the preset item was grayed out with no explanation, causing confusion. Now, a clear message informs users that presets are not available on their device.

Bug: 345112286
Test: atest BluetoothDetailsHearingAidsPresetsControllerTest
Flag: EXEMPT bugfix
Change-Id: Ie1ece8f08933eb28a5947e2a030888a6bc49bc9f
2024-06-20 14:26:06 +00:00
Julia Reynolds
3b62c23310 Design refresh for modes that don't filter notifications
And fix a crash noticed in ZenModeAppsLinkPreferenceController

Test: atest com/android/settings/notification/modes
Fixes: 308820027
Flag: android.app.modes_ui
Change-Id: I0cfe4e10ca7ff97dac3b3b8756cc36f4d6f91ea2
2024-06-20 13:10:36 +00:00
Haijie Hong
78a0662272 Merge "Determine Spatial Audio AudioDeviceAttributes by BT profile state" into main 2024-06-20 12:16:54 +00:00
Tetiana Meronyk
826b188119 Merge "Fix tests in UserDetailsSettingsTest and TimeoutToDockUserPreferenceControllerTest" into main 2024-06-20 10:34:18 +00:00
Chaohui Wang
ec59cd0c8b Move mobile data logic into MobileDataRepository
Bug: 347224962
Flag: EXEMPT refactor
Test: manual on Mobile Settings
Test: unit
Change-Id: I2b54f9e6c4addafd31d7d96f2a44870cd54fe185
2024-06-20 11:49:06 +08:00