Jeremy Goldman
6620c84d89
create junit MobileNetworkPreferenceControllerTest.
...
1. androidx lifecycle used rather than settingslib wrapper. This allows
us to handle lifecycle events from junit tests as well.
2. Use Mocks or get/set functions rather than robolectric shadows.
MobileNetworkPreferenceControllerTest Diff:
https://diff.googleplex.com/#key=5P0b2G4iYmcz
Test: atest -c MobileNetworkPreferenceControllerTest
Change-Id: If49fe64e5db89a0cdcac7d26329b8c18626a00de
2020-09-23 17:26:14 +00:00
SongFerng Wang
1fa6f33033
Merge "Fix for incorrect display of preferred network type on UI" am: bb25d4841c
am: 59996190cc
am: 14d4ca3cc0
am: f4e466d20c
am: e149bf93b3
...
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1431699
Change-Id: Ifc97dcc346e0457098c12f53fe4c641ce7e3ddc4
2020-09-23 11:30:24 +00:00
SongFerng Wang
e149bf93b3
Merge "Fix for incorrect display of preferred network type on UI" am: bb25d4841c
am: 59996190cc
am: 14d4ca3cc0
am: f4e466d20c
...
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1431699
Change-Id: I12a4d0f18bbffd891e46d3e6bef880cbe74eee34
2020-09-23 11:02:25 +00:00
SongFerng Wang
f4e466d20c
Merge "Fix for incorrect display of preferred network type on UI" am: bb25d4841c
am: 59996190cc
am: 14d4ca3cc0
...
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1431699
Change-Id: Icfb3a897844380990971bab39e19ef1d137e2b53
2020-09-23 10:36:19 +00:00
SongFerng Wang
14d4ca3cc0
Merge "Fix for incorrect display of preferred network type on UI" am: bb25d4841c
am: 59996190cc
...
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1431699
Change-Id: I09f8fc61950baac0f3d987efe84c7c6aaa6c5c13
2020-09-23 09:50:37 +00:00
SongFerng Wang
59996190cc
Merge "Fix for incorrect display of preferred network type on UI" am: bb25d4841c
...
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1431699
Change-Id: I51e37f71b93af68a88c989b29a0230d3c771e26b
2020-09-23 09:10:26 +00:00
SongFerng Wang
bb25d4841c
Merge "Fix for incorrect display of preferred network type on UI"
2020-09-23 08:49:19 +00:00
Mill Chen
ef39404b28
[automerger skipped] Update battery saver preference key am: 19843031ae
am: a740b65932
-s ours
...
am skip reason: Change-Id Ifb5b0a6786d60d1e67567272610cc3cb078f11a4 with SHA-1 db534d9c4e
is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12369339
Change-Id: I1907d8ec0568ae40e5e13749a0840de35acf0a1e
2020-09-23 08:48:10 +00:00
Mill Chen
a740b65932
Update battery saver preference key am: 19843031ae
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12369339
Change-Id: Ibbedebc554c0566157f28f9fc95e60b3ca9f142f
2020-09-23 08:27:42 +00:00
Wesley.CW Wang
ff0e65c7f7
Add intent extra when launching WallpaperPicker from SUW and Settings
...
- Add extra to these intents to help WallpaperPicker log the launch
source
Bug: 154781896
Test: make SettingsRoboTests
Change-Id: Ifb0ed22ab8ebfbb3c2ad24e9b7bad80007162b6e
2020-09-23 08:06:52 +00:00
Betty Chang
a6575f9bb8
Merge "[Telephony settings] Settings crashes when rotate screen in Preferred network type" am: 18e1a7c047
am: df73f7e090
am: c8f766c6d3
am: 1555c9b8e5
am: 6d6d8ff074
...
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1432711
Change-Id: Ibea737bff7d7e05f51b92363fed921742e7b8748
2020-09-23 04:04:41 +00:00
Jason Chiu
f6e6fc9e35
[automerger skipped] Merge "Fix the ANR in panel when changing volume continuously" into rvc-qpr-dev am: c3ed62e3ae
am: 8c26c4f2f7
-s ours
...
am skip reason: Change-Id I780b9eee35802b19a5f0ab0a7d07bd3e081f5556 with SHA-1 2c7b77dad7
is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12652533
Change-Id: I32f32ce977de0b1e0a9c98f9e603d12c6db1f124
2020-09-23 04:04:34 +00:00
Jason Chiu
6f3773fc15
[automerger skipped] Merge "Fix the endless panel loading" into rvc-qpr-dev am: a78af692c6
am: c0468c4814
-s ours
...
am skip reason: Change-Id I821faedeb62354929f3af9804cbbe44ee5bb8a53 with SHA-1 6a8d2c5e55
is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12652532
Change-Id: I3a3aa269c245f07717f32f99188e3bfe15888564
2020-09-23 04:04:02 +00:00
Mill Chen
19843031ae
Update battery saver preference key
...
The updated preference key made slice auto conversion mechanism fail,
so when this slice is requested by external apps, the UI won't be shown
properly. So we need to revert the key to the original one.
Bug: 131897855
Test: manual test
1. Open Settings app -> Settings search -> search battery saver
2. Observe battery saver result item has a toggle
Change-Id: Ifb5b0a6786d60d1e67567272610cc3cb078f11a4
Merged-In: Ifb5b0a6786d60d1e67567272610cc3cb078f11a4
2020-09-23 03:46:35 +00:00
Betty Chang
6d6d8ff074
Merge "[Telephony settings] Settings crashes when rotate screen in Preferred network type" am: 18e1a7c047
am: df73f7e090
am: c8f766c6d3
am: 1555c9b8e5
...
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1432711
Change-Id: I7e44e269d925117b03c01022cefd8ee78e07e390
2020-09-23 03:35:24 +00: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
TreeHugger Robot
4ffea906c4
Merge "Fix output switcher will display previous media session"
2020-09-23 03:27:17 +00:00
Betty Chang
1555c9b8e5
Merge "[Telephony settings] Settings crashes when rotate screen in Preferred network type" am: 18e1a7c047
am: df73f7e090
am: c8f766c6d3
...
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1432711
Change-Id: I8100cb2f94593bb36655f6faf3ccd1ab11e56170
2020-09-23 03:04:38 +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
Betty Chang
c8f766c6d3
Merge "[Telephony settings] Settings crashes when rotate screen in Preferred network type" am: 18e1a7c047
am: df73f7e090
...
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1432711
Change-Id: I1f0164ef41f5e21d9010a16c2cc8ea8d02e6c270
2020-09-23 02:46:26 +00:00
Betty Chang
df73f7e090
Merge "[Telephony settings] Settings crashes when rotate screen in Preferred network type" am: 18e1a7c047
...
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1432711
Change-Id: Ie43c80c548f4fc73c515daa4fcb810927220aa63
2020-09-23 02:22:07 +00:00
Hugh Chen
c3fe8d87d6
Fix output switcher will display previous media session
...
Before this CL, the same request code will cause intent to
be cached. It will cause the output switcher to display the
previous media session.
This CL uses the package name as an unique request code to
fix this issue.
Bug: 169077753
Test: make -j42 RunSettingsRoboTests
Change-Id: Iebfc7904609e243d5bf0222307bae98a952a3331
2020-09-23 10:20:19 +08:00
TreeHugger Robot
1e274b0f3d
Merge "Add permission to protect data when sending broadcast" into rvc-qpr-dev am: dacfb93762
am: 61a389d3c1
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12559488
Change-Id: Iabdc5749448141ec94d6502597a0441baf89e22c
2020-09-23 02:11:24 +00:00
Betty Chang
18e1a7c047
Merge "[Telephony settings] Settings crashes when rotate screen in Preferred network type"
2020-09-23 01:45:41 +00:00
TreeHugger Robot
61a389d3c1
Merge "Add permission to protect data when sending broadcast" into rvc-qpr-dev am: dacfb93762
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12559488
Change-Id: Iab614cf3403469e21827517cbb0c21528ee027f3
2020-09-23 01:28:53 +00:00
TreeHugger Robot
dacfb93762
Merge "Add permission to protect data when sending broadcast" into rvc-qpr-dev
2020-09-23 01:09:03 +00:00
TreeHugger Robot
89cc479bd8
Merge "Disable bubbles for low ram devices" into rvc-qpr-dev am: f9469f109a
am: 3bce073370
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12620222
Change-Id: I3485643cce554f1b028ed35d20b9ea4ed500cc73
2020-09-22 17:56:32 +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
Bill Yi
195208e3c9
[automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: b9d958702d
-s ours am: 7fe1972690
-s ours
...
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12660351
Change-Id: I6a1ad6eb8f9ccdbfe2ae30b7ca467eafb5e20a58
2020-09-22 14:41:16 +00:00
Bill Yi
7fe1972690
[automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: b9d958702d
-s ours
...
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12660351
Change-Id: I38b82028c9d5006514b7a89a9038270389dfec9c
2020-09-22 14:21:15 +00:00
TreeHugger Robot
c790fa9584
Merge "Import translations. DO NOT MERGE ANYWHERE"
2020-09-22 13:56:51 +00:00
TreeHugger Robot
00a909c1e2
Merge "Import translations. DO NOT MERGE ANYWHERE"
2020-09-22 13:47:44 +00:00
PETER LIANG
ed3944ae64
Merge "Fix the Real Time Text option was shown in accessibility settings under active Fi."
2020-09-22 13:08:01 +00:00
Bill Yi
21749fafe9
Import translations. DO NOT MERGE ANYWHERE
...
Auto-generated-cl: translation import
Change-Id: I39c06d5766ec5c05d35d244d2c588bd498948397
2020-09-22 11:56:53 +00:00
Bill Yi
2ac6fce38b
Import translations. DO NOT MERGE ANYWHERE
...
Auto-generated-cl: translation import
Change-Id: Ia2ba15c4be43770a9f851173841ec6ef3bf8cfe5
2020-09-22 11:23:24 +00:00
Bill Yi
b9d958702d
Import translations. DO NOT MERGE ANYWHERE
...
Auto-generated-cl: translation import
Change-Id: I59e6f5297bd364526f80af8b1125a566b869f74a
2020-09-22 10:55:48 +00:00
TreeHugger Robot
4193dd3365
[automerger skipped] Merge "Hide the icon if there is no media session or album art." into rvc-qpr-dev am: e9d4e584d5
am: e02dda0aab
-s ours
...
am skip reason: Change-Id I5f80158b12f89c8499fb97d0b203ebeffefbc18b with SHA-1 30805af9de
is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12613116
Change-Id: I853ce99afaf29c6b72e98aab03318fdf13015b9d
2020-09-22 05:23:00 +00:00
TreeHugger Robot
24b398a449
[automerger skipped] Merge "Update state when there is Bluetooth tethering state changed" into rvc-qpr-dev am: e0e283cb4c
am: a581b932c7
-s ours
...
am skip reason: skipped by user tedwang
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12559490
Change-Id: Ib7398bf9bc6c2d7bc8add45049c79c67ad6b71d9
2020-09-22 05:22:33 +00:00
TreeHugger Robot
33c973e398
Merge "Update global bubble settings mp4" into rvc-qpr-dev am: 6905a3a353
am: d37ef77d01
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12631062
Change-Id: I596a97971c9329a9151f9e64a176210e8f3751d5
2020-09-22 03:58:00 +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
d37ef77d01
Merge "Update global bubble settings mp4" into rvc-qpr-dev am: 6905a3a353
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12631062
Change-Id: Ibc8f8f67c95c84cbd9d5828790f663711f7b62f9
2020-09-22 03:21:59 +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
TreeHugger Robot
6905a3a353
Merge "Update global bubble settings mp4" into rvc-qpr-dev
2020-09-22 03:02:44 +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