Commit Graph

22363 Commits

Author SHA1 Message Date
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
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
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
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
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
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
SongFerng Wang
2f71bc764d Merge "Fix test case failed" into main 2024-06-17 05:30:06 +00:00
Chaohui Wang
288b40ee4f Fix Apn network type tests
Bug: 347114536
Test: unit test
Change-Id: Ib5bd331e9a28e89e426bf423e6086d1c2d288961
2024-06-17 11:48:53 +08:00
Yiyi Shen
9bd19f4604 Merge "[Audiosharing] Reset shadows after tests." into main 2024-06-16 13:24:13 +00:00
Yiyi Shen
440d061648 Merge "[Audiosharing] Increase audio sharing test coverage" into main 2024-06-16 13:21:38 +00:00
Alexander Roederer
be647ab053 Merge changes from topic "b308819928-ModesSettingsAppBreakthroughPage" into main
* changes:
  Modify Summary for Mode's Apps settings page
  Adds summary helper for apps subtitle
2024-06-16 02:49:53 +00:00
Alexander Roederer
41902bb0c5 Modify Summary for Mode's Apps settings page
Adds call to SummaryHelper to set Apps preference summary.

Bug: 308819928
Test: atest ZenModeAppsLinkPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: Iebec11afc62ecb79386e1866af57cd4e68461a95
2024-06-15 04:48:38 +00:00
Matías Hernández
8409c39d94 First bits of "add a mode"
* Preference below the modes list.
* Temporarily triggers addition of a mode with default name and type=SCHEDULE_TIME (type will be "manual only" later).
* Fixed sorting of modes in the list when refreshing (new modes were added at the bottom instead of where they should, the same would've happened for renamed modes).
* Minor polishes (extracted fragment launch to helper class, renamed item controller class for clarity).

Test: atest com.android.settings.notification.modes
Bug: 326442408
Fixes: 347198709
Flag: android.app.modes_ui
Change-Id: Ie276c92181c5374faf74592433595e7e15a5efc0
2024-06-14 15:23:30 +00:00
chelseahao
16f9205fb6 [Audiosharing] Add tests for qrcode related classes.
Test: atest -c com.android.settings.connecteddevice.audiosharing.audiostreams
Bug: 308368124
Change-Id: I74caacf43a23bbd0a6da44af24a1be4dd9544a5d
2024-06-14 11:38:51 +00:00
Chelsea Hao
24d8411915 Merge changes I6322ccbb,Idc96c23d into main
* changes:
  [Audiosharing] Add tests.
  [Audiosharing] Add logging 3.
2024-06-14 11:07:49 +00:00
Yiyi Shen
f570ee0018 [Audiosharing] Reset shadows after tests.
Test: atest
Bug: 345686602
Change-Id: I311ba5c8d234240e61dffd17b4357452c12f4fb1
2024-06-14 17:44:33 +08:00