Commit Graph

22524 Commits

Author SHA1 Message Date
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
Tetiana Meronyk
c502ee4540 Fix tests in UserDetailsSettingsTest and TimeoutToDockUserPreferenceControllerTest
Bug: 313530297
Test: atest UserDetailsSettingsTest && atest TimeoutToDockUserPreferenceControllerTest
Flag: EXEMPT fixing tests that were failing before
Change-Id: Ic4bd257aa26c6627d271acd1f22b59855bbddb20
2024-06-19 21:09:55 +00:00
Matías Hernández
2345b63c68 Merge "Support adding an automatic schedule to previously-manual system-owned modes" into main 2024-06-19 16:16:07 +00:00
Rambo Wang
700fff1eb7 Merge "Fix Settings restart during Reset mobile nework settings flow" into main 2024-06-19 14:41:46 +00:00
Rambo Wang
5ac9d9c8fa Fix Settings restart during Reset mobile nework settings flow
This CL avoids restarting Settings in the reset mobile flow when phone
process is restarted, by switching the usage of the stable content
provider connection to the unstable client.

The CL also arranges restarting phone process as the last reset
operation in the flow (later than RILD reset) to avoid any reset
operation get impacted by phone process restarting.

Since the permission to protect the TelephonyContentProvider has been
renamed, the CL also renames the requsted permision.

Bug: 347047105
Test: atest ResetNetworkOperationBuilderTest
Test: Reset mobile network feature test
Flag: EXEMPT resource update with minor refactoring
Change-Id: I7bfa79bc9d7451a4a03269704b0009a3730e287f
2024-06-19 14:41:19 +00:00
Matías Hernández
0bf4899f3e Support adding an automatic schedule to previously-manual system-owned modes
Bug: 342156843
Bug: 326442408
Flag: android.app.modes_ui
Test: atest com.android.settings.notification.modes
Change-Id: Ib7d15b8fc949fa73015537f03a882ef7eb6b4bcd
2024-06-19 15:06:08 +02:00
Chaohui Wang
107f7a7a83 Merge "Refactor PrintSettings (2/n)" into main 2024-06-19 06:27:48 +00:00
Chaohui Wang
03ccaf8b9d Merge "Refactor ApnEditCarrierEnabled" into main 2024-06-19 05:21:24 +00:00
YK Hung
bf38bed803 Merge "Dump the BatteryReattribute from the database into bugreport (2/5)" into main 2024-06-19 02:29:31 +00:00
Chaohui Wang
71331802ef Refactor ApnEditCarrierEnabled
Also fix tests.

Bug: 342374681
Flag: EXEMPT refactor
Test: manual - on Apn Edit
Test: unit test
Change-Id: I6db7f27a26341084940be4f8039f5097faa07ec8
2024-06-19 02:19:29 +00:00
YK Hung
d226a97617 Dump the BatteryReattribute from the database into bugreport (2/5)
Example:

    BatteryReattributeEntity{
    	Jun 18, 2024, 16:22:51
    	Jun 18, 2024, 16:23:01
    reattribute_data {
      key: 1001
      value: 0.1
    }
    reattribute_data {
      key: 1002
      value: 0.99
    }
    timestamp_end: 1718727781368
    timestamp_start: 1718727771368
    }

    BatteryReattributeEntity{
    	Jun 18, 2024, 16:22:31
    	Jun 18, 2024, 16:22:51
    reattribute_data {
      key: 1003
      value: 1.0
    }
    timestamp_end: 1718727771368
    timestamp_start: 1718727751368
    }

Bug: 346706894
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage.bugreport
Flag: EXEMPT bug fix
Change-Id: Ie2544b9f43e399d87eb29354b401834372c3a9f7
2024-06-18 16:37:55 +00:00
Haijie Hong
4296b30dcf Determine Spatial Audio AudioDeviceAttributes by BT profile state
Test: atest BluetoothDetailsSpatialAudioControllerTest
Bug: 341005211
Flag: com.android.settingslib.flags.enable_determining_spatial_audio_attributes_by_profile
Change-Id: I1436019d239414c3855d506dcf35d736c8428e0a
2024-06-18 13:11:02 +00:00
Yiyi Shen
f86b438e3a Merge "[Audiosharing] Add audio sharing loggings (P4)" into main 2024-06-18 07:47:24 +00:00
Chaohui Wang
e01855dcdb Fix SubscriptionInfoListViewModelTest
Fix: 329160337
Test: unit test
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:10f5bdabb468b806d634a2b9061b9908b2e8d430)
Merged-In: I7a3d27cb53c930a56ab0f0896b545807bf4f9dc0
Change-Id: I7a3d27cb53c930a56ab0f0896b545807bf4f9dc0
2024-06-18 06:59:56 +00:00
Kevin Liu
76d7864bc6 Merge "Add strict_mode: false" into main 2024-06-18 03:07:47 +00:00
Matías Hernández
ee414b4c43 Extract the not-strictly-modes-related parts of ZenModesBackend
So that when it's moved to SettingsLib, it doesn't need to carry that baggage.

Bug: 346519570
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I7911a521d96f5dbac2c2395171d324b7b54b8b07
2024-06-17 18:11:39 +02:00
Treehugger Robot
a3894e6761 Merge "Add new database table and proto for battery usage reattribution (2/5)" into main 2024-06-17 11:28:54 +00:00
Yiyi Shen
52cbe21569 [Audiosharing] Add audio sharing loggings (P4)
Bug: 331515891
Test: atest
Change-Id: I05e1c138f9cc32c4e873852f93bac65d3d0dc3ca
2024-06-17 18:46:11 +08:00
Chaohui Wang
9e88efecdf Refactor PrintSettings (2/n)
The "Add service" button.

Bug: 320076351
Flag: com.android.settings.flags.refactor_print_settings
Test: manual
Test: unit test
Change-Id: I624293edcbfe9ef8388d48759611aeac522352a4
2024-06-17 18:13:37 +08:00
YK Hung
f5cf54bcc7 Add new database table and proto for battery usage reattribution (2/5)
Bug: 346706894
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Flag: EXEMPT bug fix
Change-Id: If360246d974abdea7004023aedcf1a4be7b63633
2024-06-17 10:13:34 +00:00
mxyyiyi
08907935df Add flag to force expire the app optimization mode event.
Bug: 347444433
Test: atest
Change-Id: Id502607ed6c07870d14346656a65ceccb756b78f
2024-06-17 17:04:05 +08:00