Commit Graph

11006 Commits

Author SHA1 Message Date
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
Jason Chiu
b824187524 [DO NOT MERGE] Update contextual cards display mechanism
1. Make Wi-Fi card default to collapse.
2. Support showing a default card when there's no displayable card.
3. Solve the problem of icon not showing for cached slices in card
renderer

Bug: 163288869
Fixes: 159092915
Test: manual, robotest
Change-Id: Ie8b61ad58410337334e29b7a794353b0c6a6ba8c
2020-08-13 17:58:55 +08:00
Yi-Ling Chuang
228bc78bf9 [DO NOT MERGE] Pre-allocate height for contextual cards.
To prevent the UI jank causing by the async card loads, we pre-allocate
some space for the card to fill in. After this change, only one card can
be shown at a time.

More details:
- When the card number configuration is set to 0, don't trigger the card
loader.
- The height adjusting logic is as follows.
When Settings is opened, pre-allocate a space first.
After the RV finish laying out, reset the RV to wrap_content. So if the
card has to be expanded(eg. wifi large mode or dismissal view), then it
will adjust the height accordingly. While if a card previously shown
becomes unavailable(dismissed or conditions not meet), we also reset the
RV so the space can be gone.

Bug: 163288869
Test: robotest
Change-Id: I0dcb2dae8f0533e562ad06f664b7ae7a9afecd21
2020-08-12 21:40:06 +08:00
Arc Wang
b432cf293c [Wi-Fi] Fix crash after editing invalid hotspot password
From Android 11, Wi-Fi framework only supports ASCII encoding
for hotspot password, APP should check if password character is
valid.

This change checks if SoftApConfiguration accepts the password
and disable the OK button if the password is invalid.

Bug: 163353576
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiUtilsTest
Change-Id: Icf3b5c85856906e4cbe2f0ad79583c1b7182b8c7
Merged-In: Ief3c6c1f08f8fcdf128768cde3ab8eef91f19fbe
2020-08-12 14:29:30 +08:00
Jeffrey Carlyle
f22059f21f Add BatteryStatusFeatureProvider
This allows the battery header status line to be overridden.

Bug: 150239363
Test: implemented provider and changed status line text
Signed-off-by: Jeffrey Carlyle <jcarlyle@google.com>
Change-Id: I05bedbee641f087de5ee1b25a00724ce2de51f87
Merged-In: I05bedbee641f087de5ee1b25a00724ce2de51f87
2020-08-11 13:49:27 -07:00
TreeHugger Robot
edd587c2a6 Merge "[Wi-Fi] Support multi-SIM for SIM dependent EAP methods" into rvc-qpr-dev 2020-08-07 11:37:27 +00:00
Julia Reynolds
ca90cd3615 Allow DND screens on low ram devices
Low RAM devices are allowed to use NLSs and CPSs
in Android 11.

Test: this, ConditionProviderVerifierActivity (cts)
Bug: 161471776
Change-Id: Ic97f68dd3721ff50f31d81f0afa9f9a1c2c08e86
2020-08-03 14:49:05 +00:00
TreeHugger Robot
dbcba6aa6a Merge "Add 'all apps' to notification filters" into rvc-qpr-dev 2020-08-03 05:55:21 +00:00
Arc Wang
f833684e28 Merge "[Wi-Fi] Check if domain field is not empty when users choose a ca certificate" into rvc-qpr-dev 2020-08-01 02:34:05 +00:00
Julia Reynolds
cdf8888d89 Add 'all apps' to notification filters
Test: atest
Fixes: 141138853
Change-Id: If77e8186ddbfc754e7bb1a3d8541840f09db38d9
(cherry picked from commit 2d91b744cf)
2020-07-31 14:03:49 +00:00
Arc Wang
94b8579607 [Wi-Fi] Check if domain field is not empty when users choose a ca certificate
Domain is required for client to validate server's certificate.
This change disable Save button for a new Wi-Fi network of a
specified CA certificate but empty domain.

Bug: 161378819
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test
      manual
      1. Install a certificate.
      2. Add a new Wi-Fi network of EAP method PEAP
      3. Set CA certificate to the certificate installed at 1.
      4. Save button should be disabled.
      5. Input something in domain field.
      6. Save button should be enabled.
Change-Id: I65c8b29ec7a03b21403ddbfc087ce48c2a4a69e4
2020-07-31 10:06:48 +08:00
Blake Kragten
9efa2b85f0 Merge "Remove Enhanced Connectivity Dev Option" into rvc-d1-dev am: 4a142045aa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12172090

Change-Id: I00117ec751f2e097e11dca61c9bb25e37e6b3016
2020-07-29 23:27:51 +00:00
Blake Kragten
eda0a42118 Remove Enhanced Connectivity Dev Option
Applying to d1-dev as this change will be propagated to qpr branch.

Remove Developer Option Enhanced Connectivity. Remove controller and
layout variables/tests.

Bug: 162231796
Test: On Device Custom Build. Testing BSM trigger. Developer Option does
not appear anymore.

Change-Id: I8a385eb444e84975a3bbd7c063c5ce94e507c25f
2020-07-28 22:44:06 +00:00
Arc Wang
2df3a3e7df [Wi-Fi] Support multi-SIM for SIM dependent EAP methods
Before this change, users are not able to choose SIM
card for SIM dependent EAP methods when a device supports
multi-SIM.

This change support to choose a SIM when adding an EAP
Wi-Fi network. And this change support to show the related
SIM information on Wi-Fi detail screen.

Bug: 142792009
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.WifiConfigControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.WifiConfigController2Test
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.details2.WifiDetailPreferenceController2Test
      Manually add an EAP Wi-Fi network of EAP-SIM type, observe the
      value in Wi-Fi detail screen.
Change-Id: I2910931166dc6541897663857c46abcc1b3115fa
2020-07-28 10:02:16 +08:00
Arc Wang
55bce77aea Revert "[Wi-Fi] Refactor WifiConnectionPreferenceController with WifiTrackerLib"
This reverts commit ebf8ffd8fd.

Reason for revert: b/161659380

Bug: 161659380
Test: manual, observe threads after launching 'Network & internet'.
Change-Id: I28773eac40c6bf194e3410b829a1a7b744f79597
Merged-In: Id4901d632f7f4634461ebbbc096e36d348a33365
2020-07-25 00:51:50 +00:00
Julia Reynolds
2f8bc4954c Fix overlapping importance icons
We can't re-use the same background because not
all of the buttons are the same size

Test: manual
Fixes: 161297551
Change-Id: I8583cb2fbbcb971ab5819eefd84dde3f7c3b4bdf
2020-07-16 14:31:19 +00:00
Julia Reynolds
2700b83c48 Restore original importance when unblocking notif channel
Test: atest
Fixes: 62355992
Change-Id: I5d764d0ade68b2ce5708ae79e9ef488ab57bb141
(cherry picked from commit e2a8266328)
2020-07-13 20:13:43 +00:00
Lucas Dupin
03edb83f56 Merge "Delete media feature flag" into rvc-dev am: 9b01b8510a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12108974

Change-Id: I4fc62150f05b1d59bcd77fe7566dd334f1d8931d
2020-07-13 16:55:39 +00:00
Lucas Dupin
9b01b8510a Merge "Delete media feature flag" into rvc-dev 2020-07-13 16:44:15 +00:00
Lucas Dupin
42219fb395 Delete media feature flag
The feature will always be available, even for users who disabled it
on Beta 1.

Bug: 160826507
Test: manual
Test: MediaControlsParentPreferenceControllerTest
Test: MediaControlsPreferenceControllerTest
Change-Id: Ia2835e7c8156d753a8f8fbf248f2509003309fd2
2020-07-09 11:57:27 -07:00
Zhen Zhang
c570eb8c9a Merge "Fix bug: "Hotspot & Tethering" preference doesn't get updated" into rvc-dev am: 05ae65b7b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12052065

Change-Id: I5b0fbdb7f52f6570f273bc4510cd0fdecf2f7a63
2020-07-06 19:04:48 +00:00
Zhen Zhang
222be02b34 Fix bug: "Hotspot & Tethering" preference doesn't get updated
Aissign the value of mPrefrence when displayPrefrence() being called.
This can fix the preference doesn't get updated bug. Added test to
ensure it.

Bug: 160169699
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=AllInOneTetherPreferenceController

Change-Id: If0e7ce421cc46cff2b92837d2d07ea0ff4dc5fd9
2020-06-30 15:11:02 -07:00
Stanley Wang
db0687c447 Remove the prefix "Model:" from the summary of hardware.
Fixes: 159529327
Test: run robotest and observe the UI
Change-Id: I60f4a341b427e4b619a202a440f3f2554c562a27
2020-06-30 16:45:47 +08:00
TreeHugger Robot
35d0304067 Merge "Fix the Night Light page UI shrinking" into rvc-dev am: 6f4aa6e5e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11983923

Change-Id: I91ffd5a10cf3b583d8a645951550a11e49891366
2020-06-24 12:43:23 +00:00
TreeHugger Robot
6f4aa6e5e0 Merge "Fix the Night Light page UI shrinking" into rvc-dev 2020-06-24 12:24:02 +00:00
Sunny Shao
8d74809e96 Fix the Night Light page UI shrinking
- This problem causes the TwilightLocationPreferenceController too late
  to decide the preference display or not.
- Move the display criteria into the getAvailabilityStatus

Fixes: 159032276
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.display
Test: manual review
Change-Id: I5850479e8a891f837c0e6772ad1096e702f95e34
2020-06-24 12:22:59 +00:00
TreeHugger Robot
eadd54e1d9 Merge "Fix failed test cases" into rvc-dev am: 1676454b3b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11970207

Change-Id: I20545916f5ca886d67e10adf9c68a4656988f27d
2020-06-24 05:52:43 +00:00
TreeHugger Robot
1676454b3b Merge "Fix failed test cases" into rvc-dev 2020-06-24 05:41:14 +00:00