Commit Graph

12540 Commits

Author SHA1 Message Date
Betty Chang
e8b877e3ee Merge "[Testing] Use AndroidJUnit4 instead in NetworkDashboardFragmentTest" 2020-09-10 02:30:24 +00:00
Betty Chang
914fdb6b5f Merge "[Testing] Use AndroidJUnit4 instead in MobilePlanPreferenceControllerTest" 2020-09-10 02:30:09 +00:00
Yanting Yang
7b8b881f8a Merge "Resolve tiles intent before prompting a dialog for profile selection" 2020-09-09 14:44:35 +00:00
Yanting Yang
552f340dda Resolve tiles intent before prompting a dialog for profile selection
Symptom:
Once the work profile component of the tile is disabled after Settings
preloaded tiles, Settings will crash when the user clicks the work
option from the profile selection dialog.

Root cause:
Settings just checks the users from the preloaded tiles to prompt
profile selection dialog. It doesn’t check the activity for the work
profile user before launching.

Solution:
Resolve the activity by intent as users before launching if the work
profile is enabled. Directly start activity if only one user is
resolvable, otherwise prompt a dialog for profile selection.

Fixes: 162227425
Test: make RunSettingsRoboTests
Change-Id: Idcc4e5a266ab2a2252db30bb97d4be002212c677
2020-09-09 18:12:42 +08:00
changbetty
0bf90f7186 [Testing] Use AndroidJUnit4 instead in MobilePlanPreferenceControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Add @Before setup() for context
3. Change Copy Right
4. Workaround the resource getString to resolve the resource not found

Bug: 167997296
Test: atest -c MobilePlanPreferenceControllerTest
Change-Id: I5f43b6a4d20108195164038c02810b725abbcd06
2020-09-09 15:34:52 +08:00
changbetty
f24a8be2d8 [Testing] Use AndroidJUnit4 instead in NetworkDashboardFragmentTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Run the NetworkDashboardFragment on the Main thread

Bug: 168000627
Test: atest -c NetworkDashboardFragmentTest
Change-Id: I6d10737b9ac8299f2d7c847a9fdb1c3bdc4e390d
2020-09-09 11:26:42 +08:00
Jason Chiu
630b23b3de Merge "Fix the endless panel loading" 2020-09-08 06:04:23 +00:00
Betty Chang
4badae1a03 Merge "[Testing] Use AndroidJUnit4 instead in DataServiceSetupPreferenceControllerTest" 2020-09-08 01:45:08 +00:00
Betty Chang
b05056bce7 Merge "[Testing] Use AndroidJUnit4 instead in DisableSimFooterPreferenceControllerTest" 2020-09-08 01:44:17 +00:00
Betty Chang
9928db2e7e Merge "[Testing] Use AndroidJUnit4 instead in PreferredNetworkModePreferenceControllerTest test files" 2020-09-08 01:35:45 +00:00
Betty Chang
13aa43c2f8 Merge "[Testing] Use AndroidJUnit4 instead in telephony/gsm/ test files" 2020-09-08 01:33:51 +00:00
Betty Chang
645da1dac4 Merge "[Testing] Use AndroidJUnit4 instead in NrDisabledInDsdsFooterPreferenceControllerTest" 2020-09-07 09:34:56 +00:00
Hugh Chen
194dd88e7d Fix settings crash
- This CL before, "Previously connected device" didn't
  handle dock device. If user have disconnected dock
  device will cause Settings crash.

  This CL add condition to handle dock device to avoid crash.
- Update test case.

Bug: 157653997
Bug: 167054620
Test: make -j42 RunSettingsRoboTests
Change-Id: I769cee3f589e14a993b00a0ae6ec3ddfba8ef281
Merged-In: I769cee3f589e14a993b00a0ae6ec3ddfba8ef281
2020-09-07 02:59:15 +00:00
Hugh Chen
cb057d6e9e Show just disconnected device on previously connected
- This CL before, previously connected devices will show most
  recently connected devices and the maximum is 3.
  In this time, if next most recently connected device is disconnected.
  It's will not show on "previously connected devices", user needs go to
  "see all" page to found that device.
  This CL add rule to compare the priority of most recently connected
  device. If priority of next disconnected device is higher than
  currnect devices that on "previously connected devices".
  Let next disconnected device show on "previously connected devices".
- Update test case.

Bug: 157653997
Test: make -j42 RunSettingsRoboTests
Change-Id: I684501a20a67755b2196ba9d4b5565add01a5d01
Merged-In: I684501a20a67755b2196ba9d4b5565add01a5d01
2020-09-07 02:59:06 +00:00
Hugh Chen
30a97a9cc5 Display "see all" option when bluetooth is off
- This CL before, Bluetooth settings will hide the "see all"
  option when bluetooth is off. For the UX improvement, this
  CL will show the "see all" button when bluetooth is off. And
  turn on the BT when user press "see all" button to let user to
  quick pair their disconnected devices.
- Update and add test case

Bug: 147150367
Test: make -j42 RunSettingsRoboTests
Change-Id: I7a1451a36a31253b6be2203341bea4e59fed7c2b
Merged-In: I7a1451a36a31253b6be2203341bea4e59fed7c2b
(cherry picked from commit bde100849e)
2020-09-07 02:58:39 +00:00
changbetty
bc7475a08f [Testing] Use AndroidJUnit4 instead in telephony/gsm/ test files
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Workaround the resource getString to resolve the resource not found

Bug:
Test: atest -c AutoSelectPreferenceControllerTest
      atest -c OpenNetworkSelectPagePreferenceControllerTest
Change-Id: Ic80da4fcc6a64e7fde55705dda128741c26ce3cf
2020-09-07 02:31:30 +00:00
changbetty
ca2e8c8250 [Testing] Use AndroidJUnit4 instead in NrDisabledInDsdsFooterPreferenceControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Remove the @Ignore tag in isAvailable_dataOnAndDsdsAnd5GSupported_Available

Bug: 167933210
Test: atest -c NrDisabledInDsdsFooterPreferenceControllerTest
Change-Id: I455a543d7a006be21523918e48cc77b403f8b56d
2020-09-07 09:27:17 +08:00
Betty Chang
fd1f4cba36 Merge "[Testing] Use AndroidJUnit4 instead in TelephonyBasePreferenceControllerTest" 2020-09-07 00:35:18 +00:00
Jason Chiu
6a8d2c5e55 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.

Bug: 143889510
Bug: 160491854
Test: robotest, manual
Change-Id: I821faedeb62354929f3af9804cbbe44ee5bb8a53
2020-09-03 07:10:21 +00:00
Jason Chiu
2c7b77dad7 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
Bug: 144134209
Bug: 160489394
Change-Id: I780b9eee35802b19a5f0ab0a7d07bd3e081f5556
2020-09-03 14:12:10 +08:00
TreeHugger Robot
0e3c359888 Merge "Fix settings crash" 2020-09-03 00:46:02 +00:00
Anton Hansson
0e5e0c77d4 Add explicit dep on framework-wifi.impl
android_robolectric_test is having some implicit deps removed
from it, so add in what we depend on directly.

Bug: 157451444
Bug: 161767237
Bug: 167568930
Test: m RunSettingsRoboTests
Exempt-From-Owner-Approval:‌ ‌Cherry-pick
Merged-In: I847cbeaab7aab6e3cb109df7cafd8a63d63c6acb
Change-Id: I847cbeaab7aab6e3cb109df7cafd8a63d63c6acb
2020-09-02 15:41:40 +00:00
TreeHugger Robot
698b4eafa0 Merge "Set highest priority as default value to Bluetooth codec" 2020-09-02 10:14:55 +00:00
Hugh Chen
a6aae425bc Fix settings crash
- This CL before, "Previously connected device" didn't
  handle dock device. If user have disconnected dock
  device will cause Settings crash.

  This CL add condition to handle dock device to avoid crash.
- Update test case.

Bug: 167054620
Test: make -j42 RunSettingsRoboTests
Change-Id: I769cee3f589e14a993b00a0ae6ec3ddfba8ef281
2020-09-02 17:14:30 +08:00
changbetty
6a66732801 [Testing] Use AndroidJUnit4 instead in DataServiceSetupPreferenceControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right

Bug: 167386055
Test: atest -c DataServiceSetupPreferenceControllerTest
Change-Id: I06b4e9a99336e68af954138457b602061c776baa
2020-09-01 22:30:53 +08:00
changbetty
0d220e600d [Testing] Use AndroidJUnit4 instead in DisableSimFooterPreferenceControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right

Bug: 167383385
Test: atest -c DisableSimFooterPreferenceControllerTest
Change-Id: Ic725be35c4ecd44006919a74cfeab3febc6e3532
2020-09-01 14:14:10 +00:00
changbetty
7644e35698 [Testing] Use AndroidJUnit4 instead in PreferredNetworkModePreferenceControllerTest test files
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Workaround the resource getString to resolve the resource not found
5. Add @After to reset the content provider data

Bug: 167377501
Test: atest -c PreferredNetworkModePreferenceControllerTest
Change-Id: I8c123747a59eb4cf6c6b8b73109cf00cef4515f0
2020-09-01 13:42:30 +00:00
timhypeng
2f32da41ba Show all devices, including connected ones, into "Previously connected" page
-Add connected devices in "Previously connected" page
-Set active when clicking a connected device

Bug: 147150246
Test: make -j50 RunSettingsRoboTests
Change-Id: I4422cd63c360a4387cedc4f80f34474b42f82a1f
(cherry picked from commit 9743fed57d)
2020-09-01 07:52:16 +00:00
timhypeng
ce4dfc5c04 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-01 15:28:59 +08:00
Xin Li
748efff856 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Ie9d2c4d6d4618a167af1c5627d5d7918a404f398
Change-Id: I2ae428e37fd96226ce4e06032e2c0beaacbd0301
2020-08-28 23:35:54 -07:00
Arc Wang
20680c254c [Wi-Fi] Show Pie+x Wi-Fi icon when a connected Wi-Fi is not default route
This change shows Pie+x Wi-Fi icon in Wi-Fi Details for a connected Wi-Fi
network which is not the default network when

  1. It's connection speed quality is bad.
  or
  2. It has certain internet connection problem.

Bug: 163627176
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiDetailPreferenceController2Test
      manual visual
Change-Id: I1f102471426a55c7dabd9110afba20f802abedbe
2020-08-28 11:43:55 +08:00
Colin Cross
38fa185a27 Revert "Snap for 6793014 from 3777d883a3857b1a1589181c436d9018d7..."
Revert "Snap for 6793014 from 3157b4ee4325286f0c2ab0f26528460c8b..."

Revert "Snap for 6793014 from a43295d1825da62af038d345a7a861ed7a..."

Revert "Snap for 6793014 from 2076be4d27078d6ebc0a6b5e5ceb386109..."

Revert "Snap for 6793014 from d0e31526c62b2aeb35c293ac96feb180fc..."

Revert "Snap for 6793014 from 7a3a8c6351d5167a6ae0b33bc376efabd2..."

Revert "Snap for 6793014 from 41471cb21bb16b5c3bcc92f84293b79684..."

Revert "Snap for 6793014 from 42e5cca3cfb829690c9d8c6aca57a8e7d5..."

Revert "Snap for 6793014 from 4f81304963d19f4511b1e8e7d0aad87a67..."

Revert "Snap for 6793014 from 07602cdacf5bcc835db41f7eaa24af9964..."

Revert "Snap for 6793014 from 14cb57e107a3abce8b14937b1f92c28d18..."

Revert "Snap for 6793014 from ab1e4a81d09a540a5f927059e5bc03a606..."

Revert "Snap for 6793014 from 8c65adad0bcdfb3acc561063b4048dca24..."

Revert "Snap for 6793014 from b3061942700265e2bf04af9997775dcbbb..."

Revert "Snap for 6793014 from 551c5953fc62e339e4ee884ec2cd0ac3be..."

Revert "Snap for 6793014 from 4919273b2ac5c6347a18e17c5ec70d8da6..."

Revert "Snap for 6793014 from 988d4244914e0c749655e8cb6db18ba44f..."

Revert submission 12465146-release-request-6b259cbc-1f45-4b05-bc7e-c9b893b79d68-for-git_main-busytown-release-6793014

Reason for revert: b/166531456
Reverted Changes:
I5ff7a6c0d:Snap for 6793014 from f2989f9c65556d5155dbd57f82f0...
I77bdff943:Snap for 6793014 from a43295d1825da62af038d345a7a8...
I2ac5c520a:Snap for 6793014 from c3f124cca05579acf0a6cb589ebd...
I023b9702f:Snap for 6793014 from 98756d6d3e2bb0ba28eb125caa7a...
Ibc7893d72:Snap for 6793014 from fd1ad6750ef332d3f50f218f4d5d...
Ic27847bee:Snap for 6793014 from 8c65adad0bcdfb3acc561063b404...
If20bc9352:Snap for 6793014 from 7a3a8c6351d5167a6ae0b33bc376...
I6542d17e8:Snap for 6793014 from 3777d883a3857b1a1589181c436d...
I66e6bb8a9:Snap for 6793014 from 8b8bf0a07b0521bbe8483fbbab12...
I3cd190b6b:Snap for 6793014 from 424180bdc4aa18249e678daebfd0...
If92db7402:Snap for 6793014 from ab1e4a81d09a540a5f927059e5bc...
Iaced03c87:Snap for 6793014 from d0e31526c62b2aeb35c293ac96fe...
I5d28c6b4b:Snap for 6793014 from 4f81304963d19f4511b1e8e7d0aa...
I30d07bea3:Snap for 6793014 from 7594ec6384c4da320726def34f47...
I473205f48:Snap for 6793014 from 551c5953fc62e339e4ee884ec2cd...
I0656b41af:Snap for 6793014 from 44725f06b7f7d6407b5ee82d989b...
I0f9796067:Snap for 6793014 from 4919273b2ac5c6347a18e17c5ec7...
I9a38cda8f:Snap for 6793014 from 2076be4d27078d6ebc0a6b5e5ceb...
I876a82f51:Snap for 6793014 from 11467102abddb6026aaa164c1361...
I749d7d023:Snap for 6793014 from 41471cb21bb16b5c3bcc92f84293...
I038daea41:Snap for 6793014 from 07602cdacf5bcc835db41f7eaa24...
I47aa3131c:Snap for 6793014 from 14cb57e107a3abce8b14937b1f92...
I32dba8a95:Snap for 6793014 from 3157b4ee4325286f0c2ab0f26528...
I2ebc9f9db:Snap for 6793014 from 988d4244914e0c749655e8cb6db1...
Iae7c3370f:Snap for 6793014 from 9ffb8852294e06e2d387dc1fb868...
I6467a7f1b:Snap for 6793014 from 42e5cca3cfb829690c9d8c6aca57...
I8c6375203:Snap for 6793014 from b3061942700265e2bf04af999777...
I843b2e1f3:Snap for 6793014 from 265280bf5cb4bc14e132c3a35ae5...
Ie254f7079:Snap for 6793014 from f22ad3164937a8f2e309965c102b...
I01e0974ed:Snap for 6793014 from bbbccc3c2b7fc7c5780f6c415c42...

Change-Id: Ie8b2b332f7ebaaee7cd39c6f94d280c047426bc9
2020-08-27 04:12:26 +00:00
TreeHugger Robot
3777d883a3 Merge "Show just disconnected device on previously connected" 2020-08-26 14:50:45 +00:00
Hugh Chen
386df49bbc Show just disconnected device on previously connected
- This CL before, previously connected devices will show most
  recently connected devices and the maximum is 3.
  In this time, if next most recently connected device is disconnected.
  It's will not show on "previously connected devices", user needs go to
  "see all" page to found that device.
  This CL add rule to compare the priority of most recently connected
  device. If priority of next disconnected device is higher than
  currnect devices that on "previously connected devices".
  Let next disconnected device show on "previously connected devices".
- Update test case.

Bug: 157653997
Test: make -j42 RunSettingsRoboTests
Change-Id: I684501a20a67755b2196ba9d4b5565add01a5d01
2020-08-26 18:56:30 +08:00
TreeHugger Robot
98dd4491b7 Merge "Hide conversation bubble switch if app bubbles are off" into rvc-qpr-dev am: 794482fb92
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12410582

Change-Id: I84db13dbe58d05cb8639515e302b927c00342662
2020-08-25 18:58:11 +00:00
TreeHugger Robot
794482fb92 Merge "Hide conversation bubble switch if app bubbles are off" into rvc-qpr-dev 2020-08-25 18:14:50 +00:00
Jeff DeCew
9e1d9c40d8 Merge "Update NotificationChannelSettings Preferences in place to prevent re-layout." 2020-08-25 14:00:04 +00:00
Jeff DeCew
b409b64045 Update NotificationChannelSettings Preferences in place to prevent re-layout.
Fixes: 110093185
Test: ChannelListPreferenceControllerTest
Change-Id: If6acf305c44085e502a3304ea57e409ce049b40f
2020-08-24 15:11:22 -04:00
TreeHugger Robot
6a23ee5d37 Merge "Add 'Adaptive connectivity' UI" into rvc-qpr-dev am: b75d2f6009
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12391062

Change-Id: Ib275c7ce10f274d815a155cf9d95af03757e1a7c
2020-08-24 16:05:10 +00:00
TreeHugger Robot
b75d2f6009 Merge "Add 'Adaptive connectivity' UI" into rvc-qpr-dev 2020-08-24 15:47:38 +00:00
TreeHugger Robot
96b2d774fb Merge "Add 'Adaptive connectivity' UI" 2020-08-24 14:19:01 +00:00
Arc Wang
71a25ea64f Add 'Adaptive connectivity' UI
'Adaptive connectivity' toggle button controls whether
network connection is automatically managed.

Bug: 162871294
Test: make RunSettingsRoboTests
      manual
      Switch the toggle button and reboot device, observe
      if the state is retained.
Change-Id: I4499a3639abab356e8faa6316bfa45541efd63ac
2020-08-21 17:17:02 +08:00
Arc Wang
e4ba98cebe Add 'Adaptive connectivity' UI
'Adaptive connectivity' toggle button controls whether
network connection is automatically managed.

Bug: 162871294
Test: make RunSettingsRoboTests
      manual
      Switch the toggle button and reboot device, observe
      if the state is retained.
Change-Id: I4499a3639abab356e8faa6316bfa45541efd63ac
Merged-In: I4499a3639abab356e8faa6316bfa45541efd63ac
2020-08-21 16:44:06 +08:00
Lyn Han
aea66dcc96 Hide conversation bubble switch if app bubbles are off
Fixes: 159340745

Test: BubblePreferenceControllerTest

Test: priority conversation bubble
=> app bubbles OFF => toggle hidden
=> selected bubbles ON => toggle checked
=> app bubbles ON => toggle checked

Test: default/silent conversation bubble
=> app bubbles OFF => toggle hidden
=> selected bubbles ON => toggle NOT checked
=> app bubbles ON => toggle NOT checked

Change-Id: Ia5759c2a06c1da4d84b3dafed95e52c3aa30ad56
(cherry picked from commit 9af95dae7d)
2020-08-20 16:59:33 +00:00
Betty Chang
dd6f6fdb64 Merge "[Testing] Use AndroidJUnit4 instead in ApnPreferenceControllerTest" 2020-08-20 08:28:15 +00:00
changbetty
6f53c94b9a [Testing] Use AndroidJUnit4 instead in ApnPreferenceControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change the Copy Right

Bug: 165232573
Test: atest -c ApnPreferenceControllerTest
Change-Id: Iab7f648061bab9ea33f6a15231be2344be6b3499
2020-08-20 14:13:46 +08:00
Betty Chang
0ab88f263d Merge "[Testing] Use AndroidJUnit4 instead in MobileNetworkUtilsTest" 2020-08-20 04:15:36 +00:00
Kevin Chyn
54a5f51dba Merge "Update settings together with frameworks/base" 2020-08-19 22:33:04 +00:00
PETER LIANG
f92160da4a Merge changes from topic "color_correction_b_148785841"
* changes:
  Fix the screen will move by itself when enabled Color correction.
  Refine and migrate the functions that related to update preference into the specific lifecycle.
2020-08-19 07:51:41 +00:00
Peter_Liang
896e18012d Fix the screen will move by itself when enabled Color correction.
Root Cause:
Using the listener to update the UI dynamically might have some time delay.

Solution:
Refactor to another implementation and avoid using the listener to update it.

Additional condition:
Add height restriction in preference to avoid the palette view to cover whole screen.

Bug: 148785841
Test: make RunSettingsRoboTests ROBOTEST_FILTER=PaletteListPreferenceTest
Change-Id: I6a854e16321b3426e2f8ff65c6404036d55caed4
2020-08-19 11:59:59 +08:00