Commit Graph

13627 Commits

Author SHA1 Message Date
Xin Li
b8d6e73355 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: Ifcb9d4c564839199d998bd503f390f021c6bf3ad
Change-Id: I9d69bcbc6916176beece2616f152ebd3d74fc0f8
2022-06-28 21:23:28 +00:00
SongFerngWang
30a312975c Fix the testcase error
The BluetoothDeviceUdater added the checking whether the item is in the
list. It caused this testcase failed.
Add more mocks for this testcase.

Bug: 237223797
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDevicesSliceTest
Change-Id: Idb746e42480f99846efb5d1e4d4a411a5a9ca296
Merged-In: Idb746e42480f99846efb5d1e4d4a411a5a9ca296
2022-06-28 15:18:39 +08:00
SongFerngWang
7f6fcce1d5 The UI only shows the active LE device
At the media device, it only shows the active LE device which is
connected.

Bug: 232892046
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaBluetoothDeviceUpdaterTest
make RunSettingsRoboTests ROBOTEST_FILTER=ConnectedBluetoothDeviceUpdaterTest
make RunSettingsRoboTests ROBOTEST_FILTER=SavedBluetoothDeviceUpdaterTest

Change-Id: Iac661206def4d43bc40ab9bb1938f084926899c2
Merged-In: Iac661206def4d43bc40ab9bb1938f084926899c2
2022-06-28 15:03:07 +08:00
Oriol Prieto Gascó
10e5657a39 Merge "Use com.android.bluetooth as the BT stack APK" into tm-dev am: d6166e42a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18981799

Change-Id: I7fcfd55573d121122867893a5624c297a1f18653
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 17:43:23 +00:00
Oriol Prieto Gasco
f528e7de49 Use com.android.bluetooth as the BT stack APK
Test: TH
Bug: 236187653, 236192423
Change-Id: Ia86d195780a4994607b5533420cb72bd458d4f9a
2022-06-19 23:06:06 +00:00
Piotr Wilczyński
395861f79d Merge "Notify about brightness change when screen turns on" into tm-dev am: 7d634de3ea
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17898014

Change-Id: Ib7e8232d1f4dafa6418363e629ba228d1eb217e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 07:58:03 +00:00
Piotr Wilczyński
7d634de3ea Merge "Notify about brightness change when screen turns on" into tm-dev 2022-06-09 07:39:07 +00:00
Treehugger Robot
0570287625 Merge changes I0ea498d2,I2d650eb3,I8adcf27e am: 2bec16eda0 am: 4494e0fcfe
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2115174

Change-Id: I29df0438b0286cd08ecf714585d60bf234985321
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 07:38:18 +00:00
Treehugger Robot
4494e0fcfe Merge changes I0ea498d2,I2d650eb3,I8adcf27e am: 2bec16eda0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2115174

Change-Id: Ia42f377f4688deb033a87d7ea47e9c4194980517
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 06:52:27 +00:00
Treehugger Robot
2bec16eda0 Merge changes I0ea498d2,I2d650eb3,I8adcf27e
* changes:
  Grey out LE audio offload switcher as LE audio isn't enabled/supported
  Unify the LE audio string and refine the layout to put LE audio switch together
  Add LE Audio feature switcher in the developer option menu
2022-06-06 06:37:11 +00:00
Chaohui Wang
c308cad5c4 Merge "Clean up DarkUIInfoDialogFragment" into tm-dev am: 9ada0accef
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18669107

Change-Id: I2b28f1f5052b553accc273ac356bd47ea832e805
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 12:37:45 +00:00
Chaohui Wang
9ada0accef Merge "Clean up DarkUIInfoDialogFragment" into tm-dev 2022-06-01 12:24:24 +00:00
Chaohui Wang
f1487a7661 Merge "Fix flicker in Dark theme" into tm-dev am: 71fe20ea8b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18659336

Change-Id: I649d3486aa2228af4d68dc1a80b414fe36510c80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 02:50:22 +00:00
Chaohui Wang
71fe20ea8b Merge "Fix flicker in Dark theme" into tm-dev 2022-06-01 02:35:51 +00:00
Amith Yamasani
b9e7df683f Use Uri.toString() instead of Uri.toSafeString() am: 1b27c91a7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18646683

Change-Id: I169d16a6dbb7cec8a82386ebd7f482845d2f0836
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 12:23:43 +00:00
Chaohui Wang
9f6eaf8624 Fix flicker in Dark theme
Currently, when schedule sets to "Turns on at bedtime", the footer will
show a slid up animation when entering the page, this is because the
"Start time" & "End time" preferences are hidden in onResume().

This is because these 2 preferences always return AVAILABLE in
getAvailabilityStatus(), and manually update visibility in
refreshSummary(), which is called each time updateState() is called.

Usually the controller not set the visibility explicitly, but return
CONDITIONALLY_UNAVAILABLE in getAvailabilityStatus() when they want to
hide the preference.

Because getAvailabilityStatus() is called in onCreate(), by using this,
we can fix the flicker.

Fix: 234399017
Test: visual & robo test
Change-Id: I4cb7dd95d2985bd1ca4c8cb30aaebdc21a5415f8
2022-05-31 19:03:54 +08:00
Alice Kuo
0d11fd07e7 Add LE Audio feature switcher in the developer option menu
Add a switcher to enable/disable LE audio feature. The switcher could be
enabled by setprop ro.bluetooth.leaudio_offload.supported=true

screenshot: https://screenshot.googleplex.com/6aGP664S9PX5EMS

Bug: 233018305
Bug: 233005340
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioPreferenceControllerTest
Test: switch LE audio feature, and check LE audio functionality status
Change-Id: I8adcf27edd1438df445d32fca93f35ff5020a3b3
2022-05-31 18:11:58 +08:00
Chaohui Wang
75e4028b3e Clean up DarkUIInfoDialogFragment
The usage of this dialog is removed in
Change Ie2cf147de53385ae0c626c8472306f1b85317686

But this dialog is created (but not show) in DarkUIPreferenceController
each time dark mode toggle is turned on by user.

So clean this up.

Fix: 234419979
Test: make Settings
Change-Id: Icdc9d7a4fb77dc8b2a3f1a9d8e3f40fc0af4917d
2022-05-31 17:58:05 +08:00
Amith Yamasani
1b27c91a7b Use Uri.toString() instead of Uri.toSafeString()
Uri.toSafeString strips out paths and shouldn't be used
for situations other than logging.

Bug: 232694281
Test: PtsPowerTestCases
Change-Id: Iec835b738c3e928e922bd6a14573106f2ce4f526
2022-05-30 23:22:25 -07:00
Zoey Chen
bd8c589390 Merge "[LeAudio] Remove the QrCamera and decorateView in Settings" am: 31011d591f
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2107987

Change-Id: Iee27c40089c612cd2e9ac80a4fa218d707fffd0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 03:57:00 +00:00
Betty Chang
e300781fb8 Merge "Move the QrCodeGenerator from Settings to SettingsLib for Wifi and BT" am: e5a21d345d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2107794

Change-Id: I9fedeeaf397e15e8c6a9421604a0cf6def4c743c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 14:47:51 +00:00
Zoey Chen
badca36723 [LeAudio] Remove the QrCamera and decorateView in Settings
Bug: 214340362
Test: Manual test
Change-Id: Ibc29f0e90af28e14a11164fa8940920745545c7e
Merged-In: Ibc29f0e90af28e14a11164fa8940920745545c7e
2022-05-27 22:39:58 +08:00
Chaohui Wang
c20f0cabf7 Merge "Fix flicker for AppDataUsage when zero usage" into tm-dev am: 98429fbe65
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18617746

Change-Id: Ie214b97a1019488909831453470f0d250c11913f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 10:33:25 +00:00
changbetty
012527b81c Move the QrCodeGenerator from Settings to SettingsLib for Wifi and BT
Bug: 214338905
Test: Manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=QrCameraTest
Change-Id: I1ca3e9e0b2cdc9fd3f32da8c5329c0e887ee3427
Merged-In: I1ca3e9e0b2cdc9fd3f32da8c5329c0e887ee3427
2022-05-27 04:05:44 +00:00
Chaohui Wang
c2dacf1b75 Fix flicker for AppDataUsage when zero usage
When the page is entered from the AppInfoDashboardFragment, there is no
way to know whether the cycle data is available before finished the
async loading. If it's zero usage, the cycle spinner will be removed,
which cause a flicker.

Temporarily disable the preference list's animator before initial
page updates can solve this issue.

This also fix another flicker on this page when the background data is
off.

Fix: 233963355
Test: manual visual test
Change-Id: I795ed95e15bb3216fa17adfd4f57faf5fd92fa00
2022-05-27 10:21:17 +08:00
Chaohui Wang
0d415d7cc6 Merge "Fix Conversation page flickers" into tm-dev am: 7dc1aec524
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18475672

Change-Id: Icdfbe0d9c4dae5cc561c65c01b01414611fa9783
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 14:48:03 +00:00
Chaohui Wang
7dc1aec524 Merge "Fix Conversation page flickers" into tm-dev 2022-05-25 14:28:43 +00:00
Chaohui Wang
39bd94e1e5 Merge "Fix SeekBarPreference selectable test" into tm-dev am: 02314870c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18578961

Change-Id: I4c87be62cf59f3fea0c17c3fb6f5564b0cfa75e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 11:07:31 +00:00
Chaohui Wang
02314870c7 Merge "Fix SeekBarPreference selectable test" into tm-dev 2022-05-25 10:50:48 +00:00
Chaohui Wang
1e410610d8 Merge "Clean up lifecycle in MobileNetworkSettings" into tm-dev am: 87f8135959
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18591472

Change-Id: I6a8942f58c25a773719f4db05a6d44b50a491ccb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 09:31:14 +00:00
Chaohui Wang
968f30a470 Fix SeekBarPreference selectable test
SeekBarPreference is set to unselectable in change
Ie5d819088dc3c435005ddd00e232b2f6992b234a

Update the test accordingly.

Bug: 230553896
Test: robotest
Change-Id: Ia024b81e3f8e3808b0bb1e48c41a84d0ececaa85
2022-05-25 16:58:08 +08:00
Chaohui Wang
866b79c245 Clean up lifecycle in MobileNetworkSettings
To avoid double registering, which prevent potential issues and could
improve latency.

Since DashboardFragment already supported register lifecycle
automatically for the controllers bound by XML which implements
androidx.lifecycle.Lifecycle, so doing a cleanup to prevent register
lifecycle event manually (doubling).

Bug: 149338098
Test: temporarily add logging to make sure the lifecycle method is
      called and only called once
Change-Id: I4dbc36414991ef6b599be61aa77ff0dc8c52468c
2022-05-25 13:46:55 +08:00
Chaohui Wang
bd369cfee5 Fix Conversation page flickers
In this page, 3 conversation lists are implemented by the
ConversationListPreferenceController, these lists updates its contents
in updateState(), which is after the preference screen view created.
So when the first time this page is showed, animations of added contents
will be shown.

The improvement is when the first time, update the list in the
onCreate(), which is called before view creation, instead of the
updateState().

And also do the same thing for RecentConversationsPreferenceController.

Also, to reduce latency,
1. Because currently there are duplicated calls in
NoConversationsPreferenceController to check whether conversations are
exists or not, by removing the duplicated calls and reuse the result
from other controllers, the latency could be reduced.
2. Currently, there are seperated api calls, the
mBackend.getConversations(false) in AllConversationsPreferenceController
and the mBackend.getConversations(true) in
PriorityConversationsPreferenceController, use one
mBackend.getConversations(false) in ConversationListSettings to improve,
this does not change the behavior because the result is filtered in
matchesFilter() both before and after.
3. Currently, we sort conversations first then filter them, change to
filter first then sort to reduce latency.

Fix: 215073227
Test: visual check & robo tests
Change-Id: I028a7fabbbf64cf5627e6615372282a36eb784e5
2022-05-25 10:43:16 +08:00
Edgar Wang
eaa0a1cf5c Merge "Update learn more string of FooterPrefernce" into tm-dev am: 24654a3d61
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18356903

Change-Id: I10a24e8723d555c9bf81ee0efff9dea9d56bf736
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 23:24:36 +00:00
Edgar Wang
24654a3d61 Merge "Update learn more string of FooterPrefernce" into tm-dev 2022-05-20 23:13:07 +00:00
TreeHugger Robot
fdc8f75278 Merge "Revert "Show previous query upon configuration change"" into tm-dev am: fea570f524
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18486386

Change-Id: I0c2fc9f385694c894bd8a142415401b439ce29c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:52:25 +00:00
TreeHugger Robot
fea570f524 Merge "Revert "Show previous query upon configuration change"" into tm-dev 2022-05-20 12:27:55 +00:00
Chaohui Wang
246764009c Merge "Add the jank detection to Settings toggles" into tm-dev am: a47f9bb17f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18212942

Change-Id: I172dc10ef716db79989b471b5b3bd7367264c723
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:26:58 +00:00
Yi-Ling Chuang
e763ca1715 Revert "Show previous query upon configuration change"
This reverts commit d9453bf8c6.

Reason for revert: This introduces a new flicker which doesn't seem good. Will have another solution once all things are ready.

Fixes: 232355879
Change-Id: I0bbc4561ce4fbef36d59de15ae98705a6d81574c
2022-05-20 10:11:20 +00:00
Chaohui Wang
692068d535 Add the jank detection to Settings toggles
Add jank detection when click the following preferences,
 - SwitchPreference
   Single target, detect click in InstrumentedPreferenceFragment
 - PrimarySwitchPreference
   Two target, only detect click switch in switch's onClick()
 - MainSwitchPreference
   Single target, detect click in TogglePreferenceController
 - SettingsMainSwitchPreference
   Single target, detect click in its onSwitchChanged()

Bug: 230285829
Test: manual & robo tests
Change-Id: I97a13e05a601237b16cd2d903ba2fb6ec4a69a74
2022-05-19 12:28:16 +08:00
Kate Montgomery
499e8848bc Merge "Flag off stickiness of show/hide system setting." into tm-dev am: d79959bd7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18399916

Change-Id: I52df4e0f5faef88f18e0e3cb1ba8bf4572fb2226
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:36:47 +00:00
Kate Montgomery
d79959bd7d Merge "Flag off stickiness of show/hide system setting." into tm-dev 2022-05-18 19:21:45 +00:00
Kate Montgomery
dc67fb3283 Flag off stickiness of show/hide system setting.
Bug: 191503437
Test: atest SettingsRoboTests
Change-Id: I96e287cb870265e6ce379e64d01f134f8b3dde59
2022-05-17 14:24:41 +00:00
Jason Hsu
403e292044 Merge "Pop up pairing another ear dialog when detecting hearing aid is a set" into tm-dev am: 13438e6084
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17291804

Change-Id: Ie8e5fb7f0811b546ecbc1025ed80565fd1bbb608
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-15 09:48:58 +00:00
Jason Hsu
13438e6084 Merge "Pop up pairing another ear dialog when detecting hearing aid is a set" into tm-dev 2022-05-15 08:35:55 +00:00
jasonwshsu
d42a72f5cf Add mechanism to add accessibility service or activity into bluetooth 'Related' category am: 02b373522a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17472403

Change-Id: Ic4a30d77bf6f2a58a24a4a897ba0d36cce2f7dfd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-15 06:19:04 +00:00
jasonwshsu
acd3f94fde Pop up pairing another ear dialog when detecting hearing aid is a set
* Pop up dialog in 'Connected deivce' page and 'Accessibility -> Hearing
  aids' page

Bug: 225117454
Bug: 226511985
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidPairingDialogFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaDeviceGroupControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtils

Change-Id: I34a1e3ac680a7efe97dc501bfbe93f840ad16364
2022-05-14 22:16:22 +00:00
jasonwshsu
02b373522a Add mechanism to add accessibility service or activity into bluetooth 'Related' category
Bug: 225117933
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsRelatedToolsControllerTest
Change-Id: Iaa3593b4fd9d916fe7f96b3e4bb0965fdbbe36ec
2022-05-14 22:43:19 +08:00
Jason Hsu
de39f47311 Merge changes from topic "hearingAidsInT" into tm-dev am: c3bbb709b9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17321711

Change-Id: Ieb1b469f29429cb1f542b03fcdced951f72aad9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 00:57:06 +00:00
Jason Hsu
c3bbb709b9 Merge changes from topic "hearingAidsInT" into tm-dev
* changes:
  Add 'Live Caption' preference for hearing aids device in Device details page
  Update summary in Accessibility -> Hearing aids
  Header for hearing aids now listed in one summary
2022-05-14 00:24:44 +00:00