Commit Graph

10983 Commits

Author SHA1 Message Date
Edgar Wang
c5dfd3eb76 Revert^2 "Update the summary of AoD when Bedtime mode is on"
Since Bedtime mode can suppress AoD, after reviewed by UX, we decide
update the summary to "Unavailable because Bedtime mode is on" when AoD
is suppressed by Bedtime mode.

Bug: 168790245
Test: manual & robotest

Change-Id: I96b401bcba213598344c4c4f01b12c275304b809
Merged-In: Id2511cb0ad93b44f6bf701a707b7ddef9438653d
2020-11-24 05:34:49 +00:00
Yi-yo Chiang
cd4a35de8e Revert "Update the summary of AoD when Bedtime mode is on"
Revert "Update the summary of Idle lock screen when Bedtime mode..."

Revert submission 13071396-cherrypick-cherrypick-bedtime-hpxwlbiuim-0q85x8kaar

Reason for revert: Broken test b/173663404

Reverted Changes:
Id2511cb0a:Update the summary of AoD when Bedtime mode is on
I041599b9c:Update the summary of Idle lock screen when Bedtim...

Bug: 173663404
Change-Id: I9bea7499393d3ab1733b82140942499dddd9a2aa
Merged-In: I3b7053ad752f548f421dcca10cc1203500b1220b
2020-11-19 04:32:44 +00:00
Edgar Wang
bca70dd22d Update the summary of AoD when Bedtime mode is on
Since Bedtime mode can suppress AoD, after reviewed by UX, we decide
update the summary to "Unavailable because Bedtime mode is on" when AoD
is suppressed by Bedtime mode.

Bug: 168790245
Test: manual & robotest
Change-Id: Id2511cb0ad93b44f6bf701a707b7ddef9438653d
Merged-In: Id2511cb0ad93b44f6bf701a707b7ddef9438653d
2020-11-18 14:22:11 +00:00
TreeHugger Robot
03f15baeef Merge "Update related UI if battery is not present" into rvc-qpr-dev 2020-11-18 03:42:44 +00:00
Weng Su
3b4744a6c1 Merge "Fix the bug of losing Wi-Fi certificate when editing" into rvc-qpr-dev 2020-11-14 06:32:55 +00:00
Weng Su
224948fd7e Fix the bug of losing Wi-Fi certificate when editing
- When the saved certificate is loaded into the UI, the EAP method
spinner will trigger a redundant item selection event to refresh the
certificate to the default value.

- Filter out redundant item selection event of the EAP method spinner.

- Analysis report:
  https://docs.google.com/document/d/1uzyO0NQsT0PVT-ZKbWtDTt4KRXvm3L994MmZTXZ4d5Y/edit?usp=sharing

Bug: 161569880
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=WifiConfigController2Test
Merged-In: I947fb7668ffa7e9ed8c150fe14e6ae9d7a67393c
Change-Id: I00b73b4bfc078aca37396aab4c802a3de64318cf
2020-11-13 07:32:34 +00:00
Sarah Chin
854b1837c9 Merge "Update signal strength on ServiceState in service" into rvc-qpr-dev 2020-11-12 18:46:40 +00:00
Sarah Chin
62efb18365 Update signal strength on ServiceState in service
Test: make RunSettingsRobotTests
Bug: 167643728
Change-Id: Ibf69f9e9ec2acafef1316069d37b8d2a27d7d4d7
Merged-In: Ibf69f9e9ec2acafef1316069d37b8d2a27d7d4d7
(cherry picked from commit 3b3704d693)
2020-11-12 00:42:53 -08:00
Mill Chen
5a347494d2 Update related UI if battery is not present
This change is to update the related UI in the battery page if the
battery is not present. This includes the following updates:
1. Update the summary of battery tile in the Settings homepage
2. Replace the battery level with "Unknown"
3. Replace the summary with help message in the battery page
4. Remove the battery meter icon

Bug: 171368508
Test: verify on an issue device
Change-Id: I892e0d137143160a0bce0c11ce9265120ebb8fd4
Merged-In: I892e0d137143160a0bce0c11ce9265120ebb8fd4
2020-11-06 17:36:27 +08:00
Weng Su
f914e34d28 Fix the Wi-Fi detailed settings un-editable issue.
- The WifiEntry info might not be ready in early stage. (ex:
WifiEntry#canSetPrivacy())

- The Wi-Fi detailed setting listens to the WifiEntry callback to
refresh the preferences, it should first update the preference status to
be editable or not, and then display preferences to the UI.

- The privicy preference should be able to set back to selectable when
WifiEntry#canSetPrivicy() change from false to true.

Bug: 170148009
Test:
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiNetworkDetailsFragment2Test
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiPrivacyPreferenceController2Test

Change-Id: I48ca060e6b468232f19c82e9de0ce4fce39cba7f
Merged-In: I567b2b80163631a01d165c0ac5c0aba392e014ef
2020-10-21 16:39:58 +00:00
SongFerngWang
706036e5b3 To fix bug, summary is wrong if nr_enabled_bool=false
The carrier config nr_enabled_bool is false, preferred network mode
should hide 5G UI. This bug is that the summary show 5G item when
nr_enabled_bool is false.
Solution: if nr_enabled_bool is false, it checks capability and then
removes 5G capability of network mode.

Bug: 170460943
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
EnabledNetworkModePreferenceControllerTest   (PASS)
Change-Id: I3f7d41c196569c0cb61e89cfc270b957e2f0add5
2020-10-20 13:07:59 +00:00
TreeHugger Robot
1a09d244d4 Merge "Hide 'View plan' button in data usage settings" into rvc-qpr-dev 2020-10-16 22:18:33 +00:00
Jeff DeCew
5bfe1d3f9c Update NotificationChannelSettings Preferences in place to prevent re-layout.
(cherry picked from commit b409b64045)

Fixes: 110093185
Test: ChannelListPreferenceControllerTest
Change-Id: If6acf305c44085e502a3304ea57e409ce049b40f
Merged-In: If6acf305c44085e502a3304ea57e409ce049b40f
2020-10-12 20:06:48 -04:00
Sarah Chin
f3d7860c70 Hide 'View plan' button in data usage settings
There are currently no callers of the setSubscriptionPlan() API that
have a MDP app set up. Remove the button when SubscriptionPlans are
defined, since it does nothing and causes confusion for users.

Test: manually verify button does not exist when a plan is defined
Test: make RunSettingsRoboTests
Bug: 169806315
Change-Id: Ieda020bfa692e9465d6297e50cf338deff91a8a9
2020-10-08 21:03:39 -07: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
faf7a2ad78 Merge "Disable entry point of output switcher" into rvc-qpr-dev 2020-09-25 09:04:36 +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
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
f9469f109a Merge "Disable bubbles for low ram devices" into rvc-qpr-dev 2020-09-22 17:11:41 +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
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
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
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
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
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
TreeHugger Robot
c21ad3649e Merge "Display "see all" option when bluetooth is off" into rvc-qpr-dev 2020-09-15 08:01:48 +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
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
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
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
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
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
TreeHugger Robot
b75d2f6009 Merge "Add 'Adaptive connectivity' UI" into rvc-qpr-dev 2020-08-24 15:47:38 +00: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
Beth Thibodeau
48ce5892e8 Allow user to block individual apps from resuming.
This adds a new section to the media controls settings screen with a
list of apps that could potentially be used for resumption. If an app is
toggled off it will be added to a list of apps which will not persist in
QS, even when resumption is on.

Also updated the strings on this setting page to match UX
recommendation, so the default toggle state is now on.

Bug: 161813143
Bug: 159852516
Test: manual
Test: atest SettingsProviderTests
Test: make -j40 RunSettingsRoboTests ROBOTEST_FILTER="ResumableMedia"
Change-Id: Id3de52419ffba233469396dd47439428201e5e00
Merged-In: Id3de52419ffba233469396dd47439428201e5e00
2020-08-17 15:47:04 +00:00
Yi-Ling Chuang
c248da2974 [DO NOT MERGE] Pre-allocate height for contextual cards. am: 228bc78bf9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12343231

Change-Id: I76c77c66be5da635571f876d9b76906f789e8472
2020-08-15 02:08:57 +00:00
Jason Chiu
4113bf12d0 [DO NOT MERGE] Update contextual cards display mechanism am: b824187524
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12343226

Change-Id: Iaf3bcd4f531d7a82aa78c5eba12b44192e3b7df8
2020-08-15 02:08:43 +00:00
Jeffrey Carlyle
d553d434cd Merge "Add BatteryStatusFeatureProvider" into rvc-qpr-dev 2020-08-14 02:32:05 +00:00