Commit Graph

12573 Commits

Author SHA1 Message Date
changbetty
9e78b620d3 [Testing] Use AndroidJUnit4 instead in CellDataPreferenceTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Remove the PreferenceViewHolder that not used in test
5. Remove the ProxySubscriptionManager that can get the real object by
context

Bug: 168767478
Test: atest -c CellDataPreferenceTest
Change-Id: I1fa5747c8c6d224d6b13f1a693ff88e57fd150d3
2020-09-23 16:30:59 +08: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
Kevin Chyn
8d63b98272 Update settings together with frameworks/base
Bug: 169195610
Test: Builds
Change-Id: I2c732dba78eb8c90ef71351562415e06949b31bb
2020-09-23 00:17:56 -07: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
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
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
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
TreeHugger Robot
bea5bfe1ce Merge "Fix usb menu not switch to "File Transfer/Android Auto" right after connected to car unit" 2020-09-22 02:55:15 +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
Jeremy Goldman
37cfec7ac2 Merge "[Testing] AndroidJunit Enhanced4gLteSliceHelperTest" 2020-09-21 03:46:18 +00:00
TreeHugger Robot
660b17c7cb Merge "Update state when there is Bluetooth tethering state changed" 2020-09-21 03:24:38 +00:00
Jeremy
1885f027d8 [Testing] AndroidJunit Enhanced4gLteSliceHelperTest
Test: atest -c Enhanced4gLteSliceHelperTest
Change-Id: I548ffe60f00cea76d0c4af33ca4ec6f38cbf6247
2020-09-18 15:30:41 -04:00
Peter_Liang
d43fcdaf49 Fix the Real Time Text option was shown in accessibility settings under active Fi.
Root cause:
Only using and querying the dialer intent can't be represented for supporting RTT.

Next action:
Add one checker for carrier config.

Bug: 159242323
Test: manual test for AT&T, Google Fi, chunghwa sim
& make RunSettingsRoboTests ROBOTEST_FILTER=RTTSettingPreferenceControllerTest

Change-Id: I8e85b9fdfc658ea6855a4041691efdbfd07c62d6
2020-09-18 17:57:30 +08:00
Hugh Chen
af0a45bb7a Fix usb menu not switch to "File Transfer/Android Auto" right after connected to car unit
- This CL before usb receiver didn't check the extra
  information of the accessory. It will cause the usb
  menu not to be aware that the usb port is switched
  to accessory mode.

  This CL usb receiver will check intent whether to have
  accessory extra. If the usb port is switched to accessory
  mode the usb menu will switch to "File Transfer/Android Auto".
- Update test case

Bug: 162451162
Test: make -j42 RunSettingsRoboTests
Change-Id: I0eca89a23670c674b74753fc526256cc1d52e759
2020-09-18 15:45:37 +08:00
TreeHugger Robot
b7d5c72d0f Merge "Create NetworkProviderSettings for provider model" 2020-09-18 05:08:08 +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
Jeremy Goldman
d620baa3d7 Merge "[Testing] AndroidJUnit4 NetworkSelectSettingsTest" 2020-09-17 18:58:36 +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
Jeremy Goldman
7cb2738fdb [Testing] AndroidJUnit4 NetworkSelectSettingsTest
Test: atest -c NetworkSelectSettingsTest
Change-Id: I1d842cd522df87d1cc762b50ae43e9efc723b154
2020-09-17 16:08:33 +00:00
TreeHugger Robot
a4161789d6 Merge "Fix the device on "Media devices" wouldn't update" 2020-09-17 11:32:12 +00:00
Hugh Chen
cafeab2813 Fix the device on "Media devices" wouldn't update
- This CL use new CachedBluetoothDevice callback instance
  in construct to avoid unregister wrong callback.
- This CL use 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
2020-09-17 08:45:12 +00:00
Kevin Chyn
b646169818 Merge "2/n: Add default implementation for multi-biometric enroll" 2020-09-17 07:43:59 +00:00
Kevin Chyn
87bb772e16 2/n: Add default implementation for multi-biometric enroll
1) Adds a layout for multi-biometric selection in BiometricEnrollActivity
2) Adds widgets for checkboxes
3) Shows ConfirmLock*/ChooseLock* for multi-biometric devices in
   BiometricEnrollActivity
4) finish()'s when loses foreground
5) Adds default string for ChooseLock* and multi-biometrics, e.g.
   "Set up Password + Biometrics", as well as associated plumbing
   to bring the user back to BiometricEnrollActivity once the
   credential is enrolled
6) When max templates enrolled, checkbox becomes disabled and
   description string is updated

Bug: 162341940
Bug: 152242790
Fixes: 161742393

No effect on existing devices with the following:
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Test: SUW
Test: make -j RunSettingsRoboTests

Exempt-From-Owner-Approval: Biometric-related change
to EncryptionInterstitial

Change-Id: I855460d50228ace24d4ec5fbe330f02ab406cc02
2020-09-16 23:30:11 -07:00
Julia Reynolds
ebfa9e31a1 Merge "Fix crash on rotation" 2020-09-16 13:21:31 +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
TreeHugger Robot
19af143fe7 Merge "Fix settings crash" into rvc-qpr-dev 2020-09-16 03:09:38 +00:00
TreeHugger Robot
2b52c56eac Merge "Show just disconnected device on previously connected" into rvc-qpr-dev 2020-09-16 03:09:30 +00:00
Jeremy Goldman
953ed3dcd2 Merge "[Testing] AndroidJUnit4 RoamingPreferenceControllerTest" 2020-09-16 00:48:31 +00:00
Jeremy Goldman
b1f8405a83 [Testing] AndroidJUnit4 RoamingPreferenceControllerTest
Test: atest -c RoamingPreferenceControllerTest
Change-Id: I155b1c36381b65d23ca1745e72a6f8388f6909e3
2020-09-15 19:53:54 +00:00
TreeHugger Robot
9dc594b90d Merge "Show all devices, including connected ones, into "Previously connected" page" into rvc-qpr-dev am: a21c26df38
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12493713

Change-Id: I2bd0c2be1c9d9856f568df93339d526d1fed145a
2020-09-15 10:21:23 +00:00
TreeHugger Robot
a21c26df38 Merge "Show all devices, including connected ones, into "Previously connected" page" into rvc-qpr-dev 2020-09-15 09:54:08 +00:00
Bonian Chen
5d1da01e80 Merge "[Testing] Remove Robolectric import and use AndroidJUnit4 instead in MobileDataEnabledListenerTest" am: f5fa52884b am: 49936c5eb5 am: ccc406381a am: 3864e2f218
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1427810

Change-Id: I3223c2748176ebd6624ce3b7f66dbd76c4b0bd88
2020-09-15 09:34:01 +00:00
Bonian Chen
3864e2f218 Merge "[Testing] Remove Robolectric import and use AndroidJUnit4 instead in MobileDataEnabledListenerTest" am: f5fa52884b am: 49936c5eb5 am: ccc406381a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1427810

Change-Id: I65499d47dfa6b2905f65bcf6729f4f5e2ab02af9
2020-09-15 09:09:28 +00:00
TreeHugger Robot
2dfac98e04 Merge "Display "see all" option when bluetooth is off" into rvc-qpr-dev am: c21ad3649e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12392571

Change-Id: Idc4c231882c8868bf6970f19f5bc73b391302ef1
2020-09-15 08:40:43 +00:00