Commit Graph

12540 Commits

Author SHA1 Message Date
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
Bonian Chen
ccc406381a Merge "[Testing] Remove Robolectric import and use AndroidJUnit4 instead in MobileDataEnabledListenerTest" am: f5fa52884b am: 49936c5eb5
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1427810

Change-Id: Ifa4dc400eb8c87c2514a3629288657520476fbfd
2020-09-15 08:40:08 +00:00
TreeHugger Robot
c21ad3649e Merge "Display "see all" option when bluetooth is off" into rvc-qpr-dev 2020-09-15 08:01:48 +00:00
Betty Chang
195aa70291 Merge "[Testing] Use AndroidJUnit4 instead in DataUsageInfoControllerTest" 2020-09-15 06:17:53 +00:00
TreeHugger Robot
8678e5112a Merge "Fix the ANR in panel when changing volume continuously" 2020-09-15 05:43:09 +00:00
changbetty
8de635ea7b [Testing] Remove Robolectric import and use AndroidJUnit4 instead in MobileDataEnabledListenerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context

Bug: 162048313
Test: atest -c MobileDataEnabledListenerTest
Merged-In: I81b3d6ac075666a45649c8d811832a40bdb1b41b
Change-Id: I34687eb69ef62cd3b6ea6519cee608a7b95f242b
2020-09-15 12:24:10 +08:00
changbetty
5c46c0f881 [Testing] Use AndroidJUnit4 instead in TelephonyTogglePreferenceControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change the Copy Right

Bug: 164986958
Test: atest -c TelephonyTogglePreferenceControllerTest
Merged-In: I3d6c39f45cb1efb1742148f20f03372214eb0cbe
Change-Id: Ie7343f8c6dd45add2832679d95372e750ce350ce
2020-09-15 12:20:10 +08:00
changbetty
2817fa8e44 [Testing] Use AndroidJUnit4 instead in TelephonyBasePreferenceControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right

Bug: 164986221
Test: atest -c TelephonyBasePreferenceControllerTest
Merged-In: Iabe24aef0b7a5c3aa9d7be275f0c4ed552cdd2e8
Change-Id: I96e99506b534dbe7fc9e66739295e09fc543663f
2020-09-15 12:12:31 +08:00
Jeremy Goldman
0c48f53cfe [Testing] use AndroidJUnit4 in new EuiccPreferenceControllerTest
Test: atest -c EuiccPreferenceControllerTest
Merged-In: I028ca81d38252beb3abccef9e938988510f3f55e
Change-Id: I5fcd2f3e9d2e845ec9e1e2693c10330e4292fb7a
2020-09-15 12:05:44 +08:00
Betty Chang
090f32f03d Merge "[Testing] Use AndroidJUnit4 instead in CarrierSettingsVersionPreferenceControllerTest" 2020-09-15 02:37:19 +00:00
Jeremy Goldman
ca5aa8786d [Testing] use AndroidJUnit4 in new MobileDataPreferenceControllerTest
Diff: https://diff.googleplex.com/#key=OYsSkuGzJNkP
Test: atest -c MobileDataPreferenceControllerTest
Merged-In: I1a2d7b38023681f3db3320aa9f315109280cfbd0
Change-Id: Ica6625bb924ad0e813b4f9cdca62b0126b63214e
2020-09-15 10:36:14 +08:00
Jeremy Goldman
d713cc6873 [Testing] use AndroidJUnit4 in new MultiNetworkHeaderControllerTest
1. Rather than mocking the PreferenceScreen, create an instance via
PreferenceManager. Rather than stubbing PreferenceScreen functions to
return the PreferenceCategory mock, the mock is inserted using public
functions.
2. PreferenceCategory active state is checked rather than verifying the
arguments of function calls.
3. mHeaderController test superclass overrides functions which use the
Lifecycle, because doReturn+when on Spy objects has undesired side
effects.
4. Looper message queue prepared for the PreferenceScreen.

Bug: 168130550
Diff: https://diff.googleplex.com/#key=w7a7L3seOowE
Test: atest -c MultiNetworkHeaderControllerTest
Merged-In: Ic66425aca4047d2eacd04509f3bfb315f6dd57fc
Change-Id: I07925cfbb05636bdf7f0efe1811405a01dcf6523
2020-09-15 10:34:24 +08:00
TreeHugger Robot
34937eb21e Merge "Hide the icon if didn't have media session or album art" 2020-09-15 02:32:08 +00:00
Julia Reynolds
e06050cc63 Fix crash on rotation
by making the information the dialog needs available earlier

Test: manual, with rotation
Fixes: 165889571
Change-Id: I68627d17573a876f8e81cc63ccf74eee0063b63d
2020-09-14 15:27:05 -04:00
changbetty
3644df3a9e [Testing] Use AndroidJUnit4 instead in DataUsageInfoControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Rename the test case for apply the naming rule

Bug: 167948471
Test: atest -c DataUsageInfoControllerTest
Change-Id: Id8591f77d6ab2840223501962ae19eaa2749f326
2020-09-14 18:31:43 +08:00
Hugh Chen
30805af9de Hide the icon if didn't have media session or album art
- This CL before, output switcher panel will show default
  icon if there are no media session or album art.

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

Bug: 161495909
Test: make -j42 RunSettingsRoboTests
Change-Id: I5f80158b12f89c8499fb97d0b203ebeffefbc18b
2020-09-14 17:17:04 +08:00
Quang Luong
77e32049bd Merge "[Wi-Fi] Show Pie+x Wi-Fi icon when a connected Wi-Fi is not default route" into rvc-qpr-dev am: db667a8971 am: 8704114f02
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12444567

Change-Id: I95ac03dcb6a45fbc8c71aae0d7c9fcae20f36ff2
2020-09-11 23:50:57 +00:00
Quang Luong
8704114f02 Merge "[Wi-Fi] Show Pie+x Wi-Fi icon when a connected Wi-Fi is not default route" into rvc-qpr-dev am: db667a8971
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12444567

Change-Id: I655406b69ef689a1b604ed6fc6c9e4d2bbf8bf82
2020-09-11 18:57:42 +00:00
Quang Luong
db667a8971 Merge "[Wi-Fi] Show Pie+x Wi-Fi icon when a connected Wi-Fi is not default route" into rvc-qpr-dev 2020-09-11 18:30:32 +00:00
Jeremy Goldman
1f718138e5 Merge "[Testing] use AndroidJUnit4 in new MultiNetworkHeaderControllerTest" 2020-09-11 17:38:52 +00:00
Jeremy Goldman
9b8efdbe4c Merge "[Testing] use AndroidJUnit4 in new MobileDataPreferenceControllerTest" 2020-09-11 17:38:18 +00:00
Betty Chang
b5cc1860f3 Merge "[Testing] Use AndroidJUnit4 instead in MmsMessagePreferenceControllerTest" 2020-09-11 09:50:06 +00:00
Ted Wang
3876d72b7c Update state when there is Bluetooth tethering state changed
Monitor Bluetooth Tethering state and update preference when there is
Bluetooth tethering state change.
Add test case to verify when recieve
BluetoothPan.TETHERING_STATE_CHANGED will update bluetooth state

Bug: 138688805
Test: make RunSettingsRoboTests
Merged-Id: I8f468d1d99ed6d87f6cd8305ef56b0d7a5dec95b
Change-Id: I8f468d1d99ed6d87f6cd8305ef56b0d7a5dec95b
2020-09-11 09:09:46 +00:00
changbetty
018ab8e800 [Testing] Use AndroidJUnit4 instead in CarrierSettingsVersionPreferenceControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Change the Copy Right
3. Remove the shadowCarrierConfigManager to mock the
CarrierConfigManager

Bug: 168281601
Test: atest -c CarrierSettingsVersionPreferenceControllerTest
Change-Id: Id14d103a82d2d2954721624ed7a16204ee0f25b6
2020-09-11 08:45:03 +00:00
Betty Chang
4c8756704c Merge "[Testing] Use AndroidJUnit4 instead in AppPrefLoaderTest" 2020-09-11 08:38:59 +00:00
changbetty
866f40b2f6 [Testing] Use AndroidJUnit4 instead in MmsMessagePreferenceControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Change the Copy Right
3. Remove the ShadowSubscriptionManager

Bug: 168278301
Test: atest -c MmsMessagePreferenceControllerTest
Change-Id: Ie2e9c99f9899d422fde41fcd6cf4a918bc0eaf98
2020-09-11 14:52:28 +08:00
changbetty
5a22464bfa [Testing] Use AndroidJUnit4 instead in AppPrefLoaderTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Change the Copy Right

Bug: 168277399
Test: atest -c AppPrefLoaderTest
Change-Id: If4c79ae1831bd531c7e4f0a068f06a592418d7fe
2020-09-11 06:36:54 +00:00
Jeremy Goldman
a1aaccf670 [Testing] use AndroidJUnit4 in new MultiNetworkHeaderControllerTest
1. Rather than mocking the PreferenceScreen, create an instance via
PreferenceManager. Rather than stubbing PreferenceScreen functions to
return the PreferenceCategory mock, the mock is inserted using public
functions.
2. PreferenceCategory active state is checked rather than verifying the
arguments of function calls.
3. mHeaderController test superclass overrides functions which use the
Lifecycle, because doReturn+when on Spy objects has undesired side
effects.
4. Looper message queue prepared for the PreferenceScreen.

Bug: 168130550
Diff: https://diff.googleplex.com/#key=w7a7L3seOowE
Test: atest -c MultiNetworkHeaderControllerTest
Change-Id: Ic66425aca4047d2eacd04509f3bfb315f6dd57fc
2020-09-10 20:10:22 +00:00
Yi Jiang
f7b60ee566 Merge "Disable screen attention when DISALLOW_CONFIG_SCREEN_TIMEOUT" 2020-09-10 17:33:36 +00:00
Jeremy Goldman
4126ec2d32 [Testing] use AndroidJUnit4 in new EuiccPreferenceControllerTest
Test: atest -c EuiccPreferenceControllerTest
Change-Id: I028ca81d38252beb3abccef9e938988510f3f55e
2020-09-10 15:19:01 +00:00
Jeremy Goldman
ff6bc3ce27 [Testing] use AndroidJUnit4 in new MobileDataPreferenceControllerTest
Diff: https://diff.googleplex.com/#key=OYsSkuGzJNkP
Test: atest -c MobileDataPreferenceControllerTest
Change-Id: I1a2d7b38023681f3db3320aa9f315109280cfbd0
2020-09-10 15:15:08 +00:00
Yi Jiang
038d18ff73 Disable screen attention when DISALLOW_CONFIG_SCREEN_TIMEOUT
Test: atest AdaptiveSleepDetailPreferenceControllerTest
Bug: 161938926
Change-Id: I4ed96ad36efe67091a26cbfe2cde16c116f7c8fb
2020-09-10 00:58:03 -07:00
Ted Wang
47f2ebb1af Update state when there is Bluetooth tethering state changed
Monitor Bluetooth Tethering state and update preference when there is
Bluetooth tethering state change.
Add test case to verify when recieve
BluetoothPan.TETHERING_STATE_CHANGED will update bluetooth state

Bug: 138688805
Test: make RunSettingsRoboTests
Change-Id: I8f468d1d99ed6d87f6cd8305ef56b0d7a5dec95b
2020-09-10 06:15:41 +00:00
Arc Wang
746176eb56 Create NetworkProviderSettings for provider model
Provider model is a feature which improves networks
Settings UX.

NetworkProviderSettings is the fragment which allow
users to choose a mobile network or a Wi-Fi network
to connect.

At this change, NetworkProviderSettings is a clone
of WifiSettings, mobile networks will be integrated
at later CLs.

Bug: 167474581
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.network.NetworkProviderSettingsTest
Change-Id: I185639a8f2469e9ec76ad18b6c2bc2e8a4d079e3
2020-09-10 11:03:48 +08:00