Commit Graph

11685 Commits

Author SHA1 Message Date
Treehugger Robot
4d513437aa Merge "[Testing] use AndroidJUnit4 in new EuiccPreferenceControllerTest" am: 1cd8904fc5 am: 8c58bd4520 am: e570e80eb8 am: 24dc71f7e8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426562

Change-Id: I7ded23298875715dec1a48d9364a174639b7f92b
2020-09-29 05:29:33 +00:00
Treehugger Robot
6ace0ecdde Merge "[Testing] use AndroidJUnit4 in new MultiNetworkHeaderControllerTest" am: 3eeb8b44c2 am: 27978c5d47 am: 5f81bb9a07 am: bb98b793e5
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426552

Change-Id: Ieb22f4b036c3a569acdf9ea4451fba7b5d7a9851
2020-09-29 05:29:21 +00:00
Treehugger Robot
7b7382fdf2 Merge "[Testing] Use AndroidJUnit4 instead in TelephonyTogglePreferenceControllerTest" am: 71c667322c am: 48c399c18a am: 7c9cc5621b am: 7f3bbcddf0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1427808

Change-Id: Ia130edabc0cb44a787ef107641e39ead544d81af
2020-09-29 05:29:07 +00:00
Treehugger Robot
722f9f4ea8 Merge "[Testing] Use AndroidJUnit4 instead in TelephonyBasePreferenceControllerTest" am: 93cec35cea am: b4093123de am: e13fa41a29
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426565

Change-Id: If21308e7f0e67eb39c791206f1e0ee05697b54e8
2020-09-29 05:14:28 +00:00
Treehugger Robot
6513978872 Merge "[Testing] use AndroidJUnit4 in new MobileDataPreferenceControllerTest" am: 27806fde5e am: e0890849cd am: 000159f6db
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426553

Change-Id: I9e08c98c28e15bc5833d4c23e569a83840d40172
2020-09-29 05:14:19 +00:00
Treehugger Robot
24dc71f7e8 Merge "[Testing] use AndroidJUnit4 in new EuiccPreferenceControllerTest" am: 1cd8904fc5 am: 8c58bd4520 am: e570e80eb8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426562

Change-Id: I3bf65953a9751b8cfd9dab666f5b1ad400bbdd36
2020-09-29 05:14:11 +00:00
Treehugger Robot
bb98b793e5 Merge "[Testing] use AndroidJUnit4 in new MultiNetworkHeaderControllerTest" am: 3eeb8b44c2 am: 27978c5d47 am: 5f81bb9a07
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426552

Change-Id: Ic774e63dd14139999e96210bc89476edc095e02b
2020-09-29 05:14:03 +00:00
Treehugger Robot
7f3bbcddf0 Merge "[Testing] Use AndroidJUnit4 instead in TelephonyTogglePreferenceControllerTest" am: 71c667322c am: 48c399c18a am: 7c9cc5621b
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1427808

Change-Id: I4397688b601c1a8bd53ce49b5ec6db16eff9db5a
2020-09-29 05:13:51 +00:00
Treehugger Robot
e13fa41a29 Merge "[Testing] Use AndroidJUnit4 instead in TelephonyBasePreferenceControllerTest" am: 93cec35cea am: b4093123de
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426565

Change-Id: I9af0af7bbb19cfb1c7337960dc83fbc8e59eeab4
2020-09-29 05:00:53 +00:00
Treehugger Robot
000159f6db Merge "[Testing] use AndroidJUnit4 in new MobileDataPreferenceControllerTest" am: 27806fde5e am: e0890849cd
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426553

Change-Id: I88eeb86872e17fa03385dad601ed5e11f9b176d7
2020-09-29 05:00:44 +00:00
Treehugger Robot
e570e80eb8 Merge "[Testing] use AndroidJUnit4 in new EuiccPreferenceControllerTest" am: 1cd8904fc5 am: 8c58bd4520
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426562

Change-Id: Ieb5efa13b99875a9177016ec90faadd5e2d17f67
2020-09-29 05:00:35 +00:00
Treehugger Robot
5f81bb9a07 Merge "[Testing] use AndroidJUnit4 in new MultiNetworkHeaderControllerTest" am: 3eeb8b44c2 am: 27978c5d47
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1426552

Change-Id: If991989404484407853bd8ac42430761d1e37018
2020-09-29 05:00:26 +00:00
Treehugger Robot
7c9cc5621b Merge "[Testing] Use AndroidJUnit4 instead in TelephonyTogglePreferenceControllerTest" am: 71c667322c am: 48c399c18a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1427808

Change-Id: I716f8a88d3d6a6022d679736bb278d3f9eb638bb
2020-09-29 05:00:12 +00:00
Treehugger Robot
93cec35cea Merge "[Testing] Use AndroidJUnit4 instead in TelephonyBasePreferenceControllerTest" 2020-09-29 04:33:23 +00:00
Treehugger Robot
27806fde5e Merge "[Testing] use AndroidJUnit4 in new MobileDataPreferenceControllerTest" 2020-09-29 04:30:56 +00:00
Treehugger Robot
1cd8904fc5 Merge "[Testing] use AndroidJUnit4 in new EuiccPreferenceControllerTest" 2020-09-29 04:29:55 +00:00
Treehugger Robot
3eeb8b44c2 Merge "[Testing] use AndroidJUnit4 in new MultiNetworkHeaderControllerTest" 2020-09-29 04:28:34 +00:00
Treehugger Robot
71c667322c Merge "[Testing] Use AndroidJUnit4 instead in TelephonyTogglePreferenceControllerTest" 2020-09-29 04:27:45 +00:00
Hugh Chen
a50f020c85 Hide tethering option when in a guest account
- Before this CL, users can share their mobile data through enabling
  tethering in the USB menu when in a guest account.
  It will cause main users to spend their money unexpectedly.

  This CL will hide the tethering option on the USB menu when in the
  guest account.
- Add test cases.

Bug: 166125765
Test: 1. make -j42 RunSettingsRoboTests. 2. Switch to a guest account
to verify whether the tethering option is hiding.

Change-Id: I7523b3f3c3a1372bb128a58a6a7fac973d27cfbe
Merged-In: I7523b3f3c3a1372bb128a58a6a7fac973d27cfbe
(cherry picked from commit bde627b263)
2020-09-29 01:57:37 +00:00
TreeHugger Robot
e71dc5640e Merge "Disable entry point of output switcher" into rvc-qpr-dev am: faf7a2ad78
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12686593

Change-Id: I981a5fdc4356e41ceaf353b005077765568c6944
2020-09-25 09:31:06 +00:00
TreeHugger Robot
faf7a2ad78 Merge "Disable entry point of output switcher" into rvc-qpr-dev 2020-09-25 09:04:36 +00:00
Jason Chiu
cad3c395da [DO NOT MERGE] Fix the blank space on contextual card loading timeout am: 4753adfb52
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12533604

Change-Id: I974883a20ebcac94cf72ccbfdd9cab18b23d1690
2020-09-25 07:18:13 +00:00
Jason Chiu
e8b34c64f4 Merge "[DO NOT MERGE] Fix the blank space on contextual card loading timeout" into rvc-qpr-dev 2020-09-25 07:05:25 +00:00
Hugh Chen
455a0a3186 Disable entry point of output switcher
It adds a minimum value if it shows only one available
cast device in the output switcher. Because users can only
change the volume slider or stop control in the output switcher.
It's too hidden to have the user stop cast in the UI.

- This CL will disable the entry point of the output switcher
  if there is only one available cast device in the list.
- Update test cases.

Bug: 163095048
Test: make -j42 RunSettingsRoboTests
Change-Id: I8906878e1ba769d6940041f17d83b5de6b2a32c0
Merged-In: I8906878e1ba769d6940041f17d83b5de6b2a32c0
(cherry picked from commit b6840ced0d)
2020-09-25 03:18:05 +00:00
tim peng
0c786c8321 Merge "Set highest priority as default value to Bluetooth codec" am: 594849082b am: d3a9f472a2 am: f01d260512 am: 3501adcc86
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1435258

Change-Id: I336bae8e93101a682eea6b51f08c52fb83cc1fc9
2020-09-24 13:21:55 +00:00
tim peng
3501adcc86 Merge "Set highest priority as default value to Bluetooth codec" am: 594849082b am: d3a9f472a2 am: f01d260512
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1435258

Change-Id: Iaaef48f2af763fb1905596205bedd6b33574750e
2020-09-24 13:05:41 +00:00
tim peng
f01d260512 Merge "Set highest priority as default value to Bluetooth codec" am: 594849082b am: d3a9f472a2
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1435258

Change-Id: I92cf2605c1e9ee48abedc483a1e461d196b09ef2
2020-09-24 12:39:06 +00:00
timhypeng
a45a0e8980 Set highest priority as default value to Bluetooth codec
-To set highest priority when codec modification comes from development setting

Bug: 165442632
Test: make -j42 RunSettingsRoboTests
Change-Id: I8cfbaa276f3b3e269f4a80e8aae987fbb90f646e
2020-09-24 12:01:01 +08:00
Jason Chiu
8c26c4f2f7 Merge "Fix the ANR in panel when changing volume continuously" into rvc-qpr-dev am: c3ed62e3ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12652533

Change-Id: I72df2a31695885198f89d1406d31f6e434a827c1
2020-09-23 03:27:48 +00:00
Jason Chiu
c0468c4814 Merge "Fix the endless panel loading" into rvc-qpr-dev am: a78af692c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12652532

Change-Id: Iad7b84e6fe3a5c3d19048b5d0c9daf95c26465ec
2020-09-23 03:27:33 +00:00
Jason Chiu
c3ed62e3ae Merge "Fix the ANR in panel when changing volume continuously" into rvc-qpr-dev 2020-09-23 03:01:56 +00:00
Jason Chiu
a78af692c6 Merge "Fix the endless panel loading" into rvc-qpr-dev 2020-09-23 03:01:53 +00:00
TreeHugger Robot
3bce073370 Merge "Disable bubbles for low ram devices" into rvc-qpr-dev am: f9469f109a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12620222

Change-Id: I90731be022b3bc354cc1cb00e1b23a4cd1dd791f
2020-09-22 17:36:40 +00:00
TreeHugger Robot
f9469f109a Merge "Disable bubbles for low ram devices" into rvc-qpr-dev 2020-09-22 17:11:41 +00:00
TreeHugger Robot
e02dda0aab Merge "Hide the icon if there is no media session or album art." into rvc-qpr-dev am: e9d4e584d5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12613116

Change-Id: Id1ecd31b8ad1b6290ad7fda12a7752f55655ad2b
2020-09-22 03:50:01 +00:00
TreeHugger Robot
e9d4e584d5 Merge "Hide the icon if there is no media session or album art." into rvc-qpr-dev 2020-09-22 03:24:09 +00:00
TreeHugger Robot
a581b932c7 Merge "Update state when there is Bluetooth tethering state changed" into rvc-qpr-dev am: e0e283cb4c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12559490

Change-Id: If762b9aadc9f69e55a9e58400e6b92f44ba6a491
2020-09-22 03:22:13 +00:00
TreeHugger Robot
e0e283cb4c Merge "Update state when there is Bluetooth tethering state changed" into rvc-qpr-dev 2020-09-22 03:16:37 +00:00
Jason Chiu
f447cbbcb5 Fix the ANR in panel when changing volume continuously
When users open volume panel and keep on changing the volume slider for
a while, the panel starts to defer the slider updating, and finally gets
stuck and causes an ANR.

Root cause:
Volume panel has four volume adjusting slices. Each of them registers
a broadcast receiver to listen to the volume changed and muted events.
However, when the media volume changes, AudioManager will send four
broadcasts (music, assistant, accessibility, tts) to every receiver, and
each of them will reload slice four times. Thus, one media volume
changed event will lead to 16 (4*4) UI updates. Consequently, keeping on
sliding the volume bar will trigger hundreds of broadcasts and UI
updates, which makes the system busy and getting stuck.

Solution:
Introduce a VolumeSliceHelper to integrate the broadcasts of the volume
slices specifically.
1. Only register one broadcast receiver to reduce the broadcast loading
   since the four slices are listening to the same signal.
2. Filter the only one eligible broadcast among the multiple concurrent
   ones, and then relay it to the registered slice.
3. Listen to one more action STREAM_DEVICES_CHANGED_ACTION to update the
   volume panel when audio output device changes.

Test: robotest, visual
Fixes: 144134209
Fixes: 160489394
Change-Id: I780b9eee35802b19a5f0ab0a7d07bd3e081f5556
Merged-In: I780b9eee35802b19a5f0ab0a7d07bd3e081f5556
(cherry picked from commit 2c7b77dad7)
2020-09-22 02:58:01 +00:00
Jason Chiu
7db71ac87a Fix the endless panel loading
Re-launching volume panel continuously will trigger an endless panel
loading, show a transparent unfinished UI, and then block the user's
screen.

Root cause:
When the activity receives a new intent from user's clicking, it will
call PanelFragment#createPanelContent to update the current fragment.
The method triggers an animation and then loads the panel content. If
multiple invocations run concurrently before the animation or the
loading finish, the loader's countdown latch will be increased
abnormally and lead to the endless loading.

Solution:
1. Since the invocations are in UI thread, simply add a flag to avoid
reentrance when the panel is animating or loading.
2. Filter out the same panel's creation request when the panel is still
visible.
3. Do not force a panel's recreation when it's under construction.

Fixes: 143889510
Fixes: 160491854
Test: robotest, manual
Change-Id: I821faedeb62354929f3af9804cbbe44ee5bb8a53
Merged-In: I821faedeb62354929f3af9804cbbe44ee5bb8a53
(cherry picked from commit 6a8d2c5e55)
2020-09-22 02:55:22 +00:00
Lyn Han
29559b1645 Disable bubbles for low ram devices
Fixes: 167677013
Test: set low ram true => bubble settings hidden
Test: make -j80 RunSettingsRoboTests ROBOTEST_FILTER="Bubble"

Change-Id: I1c40a05404ea7c78cc82102b33e4bc3cb3528075
2020-09-21 15:11:07 -07:00
TreeHugger Robot
101308bc39 Merge "Fix the device on "Media devices" not updated issue" into rvc-qpr-dev am: ca04ccd911
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12634109

Change-Id: I5efb4653490d20f3c3fafd69ac1c3e7373921774
2020-09-21 10:17:24 +00:00
Hugh Chen
ec597c220e Fix the device on "Media devices" not updated issue
- This CL uses new CachedBluetoothDevice callback instance
  in construct to avoid unregister wrong callback.
- This CL uses flag to make sure preference will register callback
  on onAttached() when preference remove callback on
  onPrepareForRemoval() or onDetached().
- Update test case

Bug: 168682778
Bug: 157653997
Test: make -j42 RunSettingsRoboTests
Change-Id: I7a0d9f5332153ee80634e191847b84cd7c380b7d
Merged-In: I7a0d9f5332153ee80634e191847b84cd7c380b7d
(cherry picked from commit cafeab2813)
2020-09-21 09:58:33 +00:00
Hugh Chen
db0aa6541a Hide the icon if there is no media session or album art.
- Before this CL, the output switch panel will show a default
  icon if there is no media session or album art.

  This CL will hide the icon if there is no media session
  or album art.
- Add test case

Bug: 161495909
Test: make -j42 RunSettingsRoboTests
Change-Id: I5f80158b12f89c8499fb97d0b203ebeffefbc18b
Merged-In: I5f80158b12f89c8499fb97d0b203ebeffefbc18b
(cherry picked from commit 30805af9de)
2020-09-21 09:48:46 +00:00
Jason Chiu
4753adfb52 [DO NOT MERGE] Fix the blank space on contextual card loading timeout
Root cause:
Sometimes loading contextual cards exceeds 1 second and a timeout
expires. In the past, we used the timeout in order not to update
homepage UI and to avoid screen scrolling. But we've introduced a
mechanism of card space pre-allocation to avoid flickering, so when the
timeout expires, the pre-allocated space will be always blank.

Solution:
Display a card on timeout if the one-card space is pre-allocated.

Fixes: 165886791
Test: robotest
Change-Id: I79b29c5fd6d9c4fe6b53dd4f5eab4cd3a606d76d
2020-09-21 09:47:19 +00:00
Beth Thibodeau
51499b2f51 [DO NOT MERGE] Revert "Allow user to block individual apps from resuming." am: 70920bd9ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12597795

Change-Id: I4019b79c2ee725d518ff9c7b6714bda772133d47
2020-09-17 19:12:14 +00:00
Beth Thibodeau
7ca988cab1 Merge "[DO NOT MERGE] Revert "Allow user to block individual apps from resuming."" into rvc-qpr-dev 2020-09-17 17:56:29 +00:00
Beth Thibodeau
70920bd9ff [DO NOT MERGE] Revert "Allow user to block individual apps from resuming."
Revert submission 12392268-cherrypick-mediaappsettings-5fxuo164a2

Bug: 161813143

Reason for revert: no longer want change in QPR
Reverted Changes:
Id3de52419:Allow user to block individual apps from resuming....
I8c85bc937:Allow user to block individual apps from resuming

Change-Id: Ieacef217587476532246b466d680219351bc1657
2020-09-17 17:55:56 +00:00
TreeHugger Robot
cdf6fb31f0 Merge "Fix settings crash" into rvc-qpr-dev am: 19af143fe7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12523486

Change-Id: I3de2dab20767ae2e3a132cf611b85b77cbe1fc56
2020-09-16 03:43:32 +00:00
TreeHugger Robot
e8b47df453 Merge "Show just disconnected device on previously connected" into rvc-qpr-dev am: 2b52c56eac
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12493714

Change-Id: Ic3f113e706c9fe3f74eb61a2b980df9a271d806a
2020-09-16 03:42:54 +00:00