Commit Graph

10983 Commits

Author SHA1 Message Date
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
TreeHugger Robot
1431d7647a Merge "Fix com.android.settings.media test case fail" into rvc-dev am: 334985feab
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11970205

Change-Id: I71f3394e1c44c881a5bc346a59c39a1968d0d29d
2020-06-24 05:10:36 +00:00
Jason Chiu
98a8640de2 Fix failed test cases
Test: robotest
Fixes: 159688624
Change-Id: I28d53e38000d2dfb00bde900647eb38eda279c9a
2020-06-24 10:55:31 +08:00
Hugh Chen
336ff700a2 Fix com.android.settings.media test case fail
Bug: 159760643
Test: make -j42 RunSettingsRoboTests
Change-Id: I17246088ade1b5e17974ccf24a5e40b915146574
2020-06-24 10:54:43 +08:00
Stanley Wang
b1895fc072 Merge "Fix the bug of not showing lock screen before entering Smart Lock page." into rvc-dev am: 7afb61e6dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11949297

Change-Id: I7bda54792d81ace1bcdee9f018fb3e5f3db0fc1b
2020-06-22 10:38:04 +00:00
Stanley Wang
7afb61e6dc Merge "Fix the bug of not showing lock screen before entering Smart Lock page." into rvc-dev 2020-06-22 10:25:58 +00:00
Stanley Wang
f1a0801c00 Fix the bug of not showing lock screen before entering Smart Lock page.
Controller can't find the target preference to handle the click event.
Store the preference keys to match the clicked item.

Fixes: 158716163
Test: run robotest and manually test the click behavior

Change-Id: Ie243206ceffef013c56c4ea29c14fe56da510fb6
2020-06-22 16:49:02 +08:00
TreeHugger Robot
2b697fac94 Merge "Make Telephony related PreferenceController un-sliceable" into rvc-dev am: fbabf8f251
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11862423

Change-Id: I97fcaa6787a5f9a205e8027d3bfe9d52fa358b6a
2020-06-22 03:44:17 +00:00
TreeHugger Robot
fbabf8f251 Merge "Make Telephony related PreferenceController un-sliceable" into rvc-dev 2020-06-22 03:27:01 +00:00
tim peng
9ff43d2fa3 Merge "Add a separate line at the bottom of list area in output switcher" into rvc-dev am: 02e311e537
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11900663

Change-Id: Ida3ffa1110238057993e4ce345dce3cb3a8791d6
2020-06-20 10:25:04 +00:00
tim peng
02e311e537 Merge "Add a separate line at the bottom of list area in output switcher" into rvc-dev 2020-06-20 10:12:03 +00:00
Mill Chen
a99b8799ee Make Telephony related PreferenceController un-sliceable
Since the structure of Telephony is changed, some of Telephony
related PreferenceController cannot be converted to slices
smoothly whether devices have mobile data or not. So we
decided to make them un-sliceable.

Bug: 155846002
Test: robotests, manual
1. Settings -> Settings search -> search for roaming
2. Check that roaming result has no toggle widget.
Change-Id: I7cba8f6a750d9780a59411942665f68dac61248c
2020-06-20 08:20:07 +00:00
TreeHugger Robot
731e6d8e5f Merge "NetworkModePreference's list needs to allow values set from overlay." into rvc-dev am: 5b849d8ac8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11908541

Change-Id: I924680694eb54be8e4447e873aa195aa1f5c19c4
2020-06-20 04:43:49 +00:00
TreeHugger Robot
5b849d8ac8 Merge "NetworkModePreference's list needs to allow values set from overlay." into rvc-dev 2020-06-20 04:35:24 +00:00
Tim Peng
aeabfc3050 Add a separate line at the bottom of list area in output switcher
-Bottom divider is not showed when there are more than 7 devices exist in output switcher
-Check panel type in isDividerAllowedBelow()
-Hide the Slice bottom divider of Output switcher panel
-Show divider in panel layout only for output switcher panel

Bug: 159177275
Test: make -j42 RunSettingsRoboTests

Change-Id: I49396a0ee0543b494a2b3d714ec248ebab08e7ba
2020-06-20 03:44:43 +00:00
SongFerngWang
36796a1616 NetworkModePreference's list needs to allow values set from overlay.
Root cause: ag/10614943 removed the resources, so each of item
values is hard coded. This broke the overlay. This CL adds the
resource back so the overlay can work.

Bug: 159301925
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
EnabledNetworkModePreferenceControllerTest (PASS)

Change-Id: Id5ad2fdd0a87586136e4a26d2e44cf5278df5d9d
2020-06-20 11:21:18 +08:00
Beth Thibodeau
43834d78ff [DO NOT MERGE] Add toggle for media resumption am: 13f3e8f04b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11826883

Change-Id: Ib4fffb001ffe58da7e0a9ed759dc75c475b3ae8a
2020-06-19 22:40:24 +00:00
Beth Thibodeau
0b152c29d0 Merge "[DO NOT MERGE] Add toggle for media resumption" into rvc-dev 2020-06-19 22:26:59 +00:00
Mark Chien
5f643bb4db Merge "Remove unused resource from TetherServiceTest" into rvc-dev am: 45a953b56c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11908542

Change-Id: I63a125c5291f71811e2c010d946c0440c1eca29c
2020-06-19 05:45:00 +00:00
TreeHugger Robot
a68b7cc6bf Merge "Remove the feature flag of contextual home V2" into rvc-dev am: e8e4e4bafc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11910083

Change-Id: Idc85a865b5579bc08dbb4b0e6b92726bb2e6cf08
2020-06-19 05:44:52 +00:00
Mark Chien
45a953b56c Merge "Remove unused resource from TetherServiceTest" into rvc-dev 2020-06-19 05:43:36 +00:00
TreeHugger Robot
e8e4e4bafc Merge "Remove the feature flag of contextual home V2" into rvc-dev 2020-06-19 05:06:12 +00:00
markchien
efb029c067 Remove unused resource from TetherServiceTest
TetherService is no longer query resource by itself after ag/11524847.
That CL miss to remove unused getResources code.
Now remove unused resource in this change.

Bug: 146918263
Test: atest TetherServiceTest
Change-Id: I3b0da2672246997aee16b11576ce5ae9bfe596dc
2020-06-19 03:37:38 +00:00
Jason Chiu
d489acb2e3 Remove the feature flag of contextual home V2
Bug: 159393461
Test: robotest & rebuild
Change-Id: If5f030b4c8bd5ef61bb722da9ae7f3ace0ac6e0e
2020-06-19 11:23:57 +08:00