Commit Graph

9854 Commits

Author SHA1 Message Date
Chaohui Wang
f21acd4bfc Merge "Add unit test for Keyboards & HomeScaffold" 2022-12-05 13:04:21 +00:00
Chaohui Wang
ed6306649a Merge "Clean up forked collectAsStateWithLifecycle" 2022-12-05 13:03:59 +00:00
Chaohui Wang
7e5ba3eea7 Clean up forked collectAsStateWithLifecycle
Use the the one from androidx.lifecycle.compose instead.

Bug: 236346018
Test: Unit test
Change-Id: I90217ed9eb6ee0e97db87edf4e69e8255fcc8197
2022-12-05 09:30:31 +00:00
Chaohui Wang
4dcd72315b Import updates from Accompanist
Bug: 235727273
Test: Manually with Gallery
Change-Id: I60630f1dbf275bf414baaeb0d8bfc6496ec11886
2022-12-05 09:07:10 +00:00
Chaohui Wang
54b802dc39 Add unit test for Keyboards & HomeScaffold
Bug: 260660819
Test: Unit test
Change-Id: I848684ef1729a24564ae681cefd225203572b562
2022-12-05 16:12:35 +08:00
Chaohui Wang
ea89a254ec Merge "Add Jacoco coverage report task for SpaLib" 2022-12-05 08:02:53 +00:00
Zekan Qian
01958ea8a7 Merge "Refactor widget folder" 2022-12-05 05:56:20 +00:00
Chaohui Wang
9f28f692cb Add Jacoco coverage report task for SpaLib
Bug: 260441791
Test: Gradle Sync
Test: Generate Jacoco coverage report
Change-Id: I31259be00ec52defff6a2dbe55724cd05757f417
2022-12-05 11:56:28 +08:00
Zekan Qian
4f191eca0f Refactor widget folder
Move Illustration widget to its own folder.
Move ChartTest to chart folder (to be aligned with the widget)

Bug: 244122804
Test: unit-test & local build gallery
Change-Id: Id6b8237ff37916724a5aaeb915c75400a9408113
2022-12-05 10:23:49 +08:00
Chaohui Wang
7459ecff6e Refactor TogglePermissionAppInfoPageProvider
Also add unit tests.

Bug: 260660819
Test: Unit test
Test: Manually with Settings
Change-Id: Ifb6844f4127f07ea5d211d68806e683144310589
2022-12-05 00:27:28 +08:00
Chaohui Wang
e3bda5623b Hide not changeable app from AppOpPermissionAppList
Also add unit tests for AppOpPermissionAppList.

Also correct the test only resources R to
com.android.settingslib.spaprivileged.test.R

Bug: 260660819
Test: Unit test
Test: Manually with Settings
Change-Id: I732f777906c5ea4a79e876b982ba0ca28b39a0ee
2022-12-05 00:25:13 +08:00
Chaohui Wang
f9078e0e36 Add tests for Flows & StateFlowBridge
Also move test utils to the correct folder.

Bug: 260660819
Test: unit tests
Change-Id: I74a49047c644475f7b0be3bf6b8308b4bb353e80
2022-12-05 00:24:18 +08:00
Bill Yi
5399e4bd81 Merge "Import translations. DO NOT MERGE ANYWHERE" 2022-12-03 01:33:58 +00:00
Bill Yi
ec676e9dc4 Merge "Import translations. DO NOT MERGE ANYWHERE" 2022-12-03 01:33:58 +00:00
TreeHugger Robot
89b5aa840a Merge "Update charging limited string" into tm-qpr-dev am: 4bd41537f3 am: 888d0b4397
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20506896

Change-Id: I497a916e8af4de99573cf2f05c85329ade54e490
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 02:28:56 +00:00
TreeHugger Robot
90e78e90e0 Merge "Use androidx.arch.core InstantTaskExecutorRule" 2022-12-01 17:36:30 +00:00
Chaohui Wang
fe4041eeab Merge "Add default AppListModel filter and getSummary" 2022-12-01 10:21:21 +00:00
Zekan Qian
3092a89dbe Support extraData in SpaLogger API.
Add session_name / switch_status / display_name as extraData.

Bug: 253979024
Test: unit-test & local build gallery
Change-Id: I8106ba3e0dd4e1eab922087c86aca0b62e6a2089
2022-12-01 11:29:26 +08:00
Chaohui Wang
b95a080d41 Use androidx.arch.core InstantTaskExecutorRule
Bug: 260660819
Test: Unit test
Change-Id: Ia57018037244130f0d88eb4f6c0d4a86aae9353c
2022-12-01 11:22:24 +08:00
Chaohui Wang
88d3864bf1 Add default AppListModel filter and getSummary
To simply some simple usage case and unit test.

Also add Flow<List<T>>.mapItem(), we could use mapItem() instead of
asyncMapItem() when async is not need.

Bug: 260660819
Test: Make Settings
Change-Id: I958aeaeb8c0e98ee0873b39a958a5ef5158dd76a
2022-12-01 00:41:00 +00:00
Zekan Qian
cd097243fb Merge "Add SpaIntent for all intent operator in Spa" 2022-12-01 00:25:30 +00:00
TreeHugger Robot
888d0b4397 Merge "Update charging limited string" into tm-qpr-dev am: 4bd41537f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20506896

Change-Id: I5e8d4a27c6fc1984a3ffa23870780c5732b3313b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 22:09:08 +00:00
Wesley Wang
06d7a2fc86 Merge "Update battery list item string" into tm-qpr-dev am: 13b8dee0da
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20579931

Change-Id: I106070ec9f59b4cd056806fff8136f48414d7345
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 17:21:36 +00:00
Nora Csitari
4a49ec0d0a Merge "Add TwoTargetPreference to Health Connect" 2022-11-30 14:47:25 +00:00
Zekan Qian
edcfec0fe7 Add SpaIntent for all intent operator in Spa
Support Session Name in SpaIntent
Add tests for SpaIntent
Set proper Session Name in DebugActivity, SpaSearchProvider & SliceUtil

Bug: 244122804
Test: unit-test & local build gallery
Change-Id: Ia9c21e2f56dcf7b4437e5bb417bdfe05b7c85b77
2022-11-30 20:43:09 +08:00
Wesley Wang
8ec7a34b7e Update charging limited string
Bug: 260687359
Test: make test
Change-Id: Ia60a61b46dda945b5446291f4ff1f94ee9605493
2022-11-30 12:00:24 +00:00
Bill Yi
66b670bf23 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic919878e24dbad011e27e3da649eee2873c247f4
2022-11-30 01:05:05 -08:00
Bill Yi
320883642a Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Iac1aa86061629b8ccb596a9c7015e89f03a0e82e
2022-11-30 01:01:19 -08:00
Chaohui Wang
757690a3c1 Add initial tests for TogglePermissionAppList
Bug: 260660819
Test: Gradle Sync
Test: Unit test
Change-Id: Ia61c15b019a8bf4f3ff5fa0cc1b1f7066069f383
2022-11-30 16:05:21 +08:00
Chaohui Wang
4aaca3acb0 Refactor for AppListItem
Also added unit test for AppListPage.

Bug: 260660819
Test: Unit test
Change-Id: Ia98c73a81786ac9ab6691aa64c67b3623d6890b8
2022-11-30 16:01:50 +08:00
Zekan Qian
c6f7abebf2 Merge "Add session source name." 2022-11-30 07:50:04 +00:00
Zekan Qian
93440c2ef4 Merge "Add tests of SpaSearchProvider" 2022-11-30 07:42:39 +00:00
Angela Wang
1691b994bc Merge "BLE hearing aid information in Bluetooth device preference" 2022-11-30 04:20:00 +00:00
Zekan Qian
4826165a16 Add tests of SpaSearchProvider
Move SpaSearchProvider.kt to search/ folder
Deprecate setIsAllowSearch API in EntryBuilder

Bug: 256582545
Test: unit-test & local build gallery
Change-Id: I0fc9ef3e935e512f738cd07c9e3837a2ee1ad272
2022-11-30 12:16:27 +08:00
Zekan Qian
60dc72c8c0 Add session source name.
Move PageLogger to separate file
Add session source name in navController and read in PageLogger.
Next: set different session source name in DebugActivity for demo.

Bug: 244122804
Test: unit-test & local build gallery
Change-Id: Ia6b745588314a1dd451cba539d2b09dc7005ec8e
2022-11-30 10:43:44 +08:00
YK Hung
0e2fdeaa74 Merge "Add common getBatteryLevel() method into the SettingsLib" 2022-11-29 23:29:45 +00:00
csitari
0422eab7ff Add TwoTargetPreference to Health Connect
Bug: 246773887
Test: Manual
Change-Id: I6c9f437fb51d8506f470b6775ecf8d97d1185c0d
2022-11-29 14:20:53 +00:00
ykhung
e751388ed8 Add common getBatteryLevel() method into the SettingsLib
Add a new common getBatteryLevel() method into the SettingsLib for
SystemUI and Settings apps usage (moved from
http://cs/android/packages/apps/Settings/src/com/android/settings/fuelgauge/BatteryUtils.java;l=606;rcl=706fc209fc38cb8c97c1bd6d37549c65d111e4d3)

Bug: 260524172
Test: presubmit
Change-Id: If7813ccdc6d39e4527a2df6f43835af6c23e5f79
2022-11-29 21:23:09 +08:00
Zhenwei Chen
ec5911f400 Update battery list item string
Bug: 260687359
Test: Manual test on the device
Merged-In: I475e0183ddbf462433786f254ad6d62c8abaa0bd
Change-Id: I475e0183ddbf462433786f254ad6d62c8abaa0bd
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
(cherry picked from commit 918deaf211)
2022-11-29 10:32:06 +00:00
Zekan Qian
21313dac65 Merge "Cleanup setIsAllowSearch in Gallery" 2022-11-29 04:02:45 +00:00
Angela Wang
0f0862124c BLE hearing aid information in Bluetooth device preference
Update the bluetooth icon and summary text for BLE hearing aid shown in
Bluetooth device preference.

BLE hearing aid will connect to both LE audio and HAP client profile.
These two profiles which connect first will be displayed as the device
bluetooth icon, but is should be hearing aid icon for BLE hearing aid.

The solution is to check if the device connected to any of the hearing
aid related profiles first. If hearing aid related profiles found, it
should use hearing aid icon. Otherwise, it should check if any other
profile has specific icon to show.

Bug: 259904131
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceTest
Change-Id: I5dbe90814ce1199fae704833935dd897a36128f2
2022-11-29 03:16:34 +00:00
Zhenwei Chen
2396eacf03 Merge "Update battery list item string" 2022-11-29 02:53:26 +00:00
Chaohui Wang
a1f5e537a9 Merge "Add Context.activityManager" 2022-11-29 02:06:35 +00:00
Zekan Qian
4b2ed46bd8 Cleanup setIsAllowSearch in Gallery
Bug: 244122804
Test: unit-test & local build gallery
Change-Id: I74a79a774559e1fa4dfc0b0893f8f1366ed9c84f
2022-11-29 09:51:07 +08:00
Zekan Qian
b769860c31 Merge "Add tests of BrowseActivity" 2022-11-28 23:32:22 +00:00
Ankita Vyas
4ae8fc3e60 Merge "Add isCloned variable in AppEntry" 2022-11-28 15:41:37 +00:00
Angela Wang
29c0bb4fcb Merge changes from topic "log-hap"
* changes:
  Updates hearing aid related log for BLE hearing aids (1/2)
  Unifies constants accross hearing aid related profiles (1/2)
2022-11-28 14:26:43 +00:00
Chaohui Wang
42999e8243 Add Context.activityManager
Bug: 236346018
Test: Unit test
Change-Id: I9104f6ec035e92e04c6ee134d1a02dd8316b8f6f
2022-11-28 20:30:29 +08:00
Angela Wang
b55bf39e24 Updates hearing aid related log for BLE hearing aids (1/2)
Retrives BLE hearing aid device type from
HapClientProfile#getHearingAidType() and audio location from
LeAudioProfile#getAudioLocation(). Sets these HearingAidInfo to
CachedBluetoothDevice when both profiles are connected.

Bug: 253192350
Test: m statsd_testdrive & statsd_testdrive 513
Change-Id: Ib50b2612903decf554f594335a56465fe4c47cfa
2022-11-28 10:01:14 +00:00
Angela Wang
19ef1c3a10 Unifies constants accross hearing aid related profiles (1/2)
Hearing aid constants defined differently accross different hearing aid
related profiles. For hearing aid device mode, HearingAidProfile and
HapClientProfile have different value for mode definition and there is also a new BANDED hearing aid type in HapClientProfile spec. For hearing aid device side, HearingAidProfile has only 2 kinds of side which is left and right whereas BLE hearing aid can retrieve 27 different kinds of audio location.

We therefore introduce a new class HearingAidInfo for mapping these
different constants accross these profiles into a single unified set of
constants.

Bug: 253192350
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceManagerTest
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceTest
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=HearingAidDeviceManagerTest
Change-Id: I769e94c13b56f457b5ebee38b1ed168e3981ad34
2022-11-28 09:58:15 +00:00