Commit Graph

11006 Commits

Author SHA1 Message Date
Jason Chiu
8ac1e4d49d Update icon tint color when the user toggles Dark theme
- Reload theme in slice provider when Dark theme mode changes for slices
- Reload theme in onCreate of Panel activity for its non-slice header
- Remove applyTheme from individual slices

Test: robotest
Fixes: 153700819
Change-Id: I40a7d2817c4b9100d7b2f2962a69c8a9ce6f7906
2020-05-12 10:58:54 +08:00
Tim Peng
550fd3ef9a When only one device is selected in dynamic group, the device should be disabled
-Check if device id is in selected group rather than comparing client package name
-Add test cases

Bug: 154916764
Test: make -j50 RunSettingsRoboTests
Change-Id: I7364a9e3d807bbfc6b26b8212ab2da67ea329582
2020-05-12 01:44:56 +00:00
tim peng
72948ab538 Merge "Update "Play media to" in Sound Settings" into rvc-dev 2020-05-11 02:45:27 +00:00
TreeHugger Robot
83cc03d0b1 Merge "Add low battery level for case" into rvc-dev 2020-05-08 08:39:39 +00:00
hughchen
6060bc66e5 Add low battery level for case
- Add low battery level for case, because case and headset have
  different low battery level.
- Update test case

Bug: 154569936
Test: make -j42 RunSettingsRoboTests
Change-Id: Icf045b62992dde8d789e66343764849e43df1933
2020-05-08 15:15:15 +08:00
Tim Peng
f392eae213 Update "Play media to" in Sound Settings
-Change string to "Play <APP Label> on"
-Hide it when there is no local playback
-Disable search index
-Add test cases

Bug: 155720628
Test: make -j50 RunSettingsRoboTests
Change-Id: Id104d5b49c069a761e4cf82385bf1225d494c95e
2020-05-08 12:15:11 +08:00
Andras Kloczl
4d7d4effa5 Improve multi user settings screen
- Added switch and user delete functionality to details screen.
- Added robo tests.

Screenshots: http://shortn/_S6fbIMhAYO
Bug: 142798722
Test: Run robo tests with this command:
  make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.users.*SettingsTest"
Change-Id: Ied67290e8fed87feb0a60a3f2c40eb91cc57988e
2020-05-07 22:01:33 +01:00
Fabian Kozynski
64097cbb11 Merge "Fix default for CONTROLS_ENABLED" into rvc-dev 2020-05-07 13:24:04 +00:00
Edgar Wang
e13919cf4b Merge "Revert "Improve multi user settings screen"" into rvc-dev 2020-05-07 09:28:23 +00:00
Edgar Wang
fff8c56de2 Revert "Improve multi user settings screen"
This reverts commit d19dc306dd.

Reason for revert: this CL made Settings the test cases called shadowUserManager.hasUserRestriction()
https://sponge.corp.google.com/target?show=FAILED&sortBy=STATUS&id=07150153-ccb7-4215-a9f8-eed31e44c66f&target=RunSettingsRoboTests1-test-output

Bug: 142798722

Change-Id: I3937a07ee35a472cadd6db8cd0177e08e63516a4
2020-05-07 09:24:47 +00:00
Yanting Yang
cf33b4bc5e Merge "Hide the app details preference for mainline module apps" into rvc-dev 2020-05-07 08:41:39 +00:00
Bonian Chen
cae9a9c2fb Merge "[Settings] Update EID in background" into rvc-dev 2020-05-07 08:20:58 +00:00
Kevin Maurin
56cefaf3d6 Merge "Display "Android Auto" in Connected Devices summary text." into rvc-dev 2020-05-07 07:20:57 +00:00
TreeHugger Robot
a76a871653 Merge "[Wi-Fi] Enhance Wifi Settings unit test cases." into rvc-dev 2020-05-07 07:11:32 +00:00
Bonian Chen
d1c8d2a771 [Settings] Update EID in background
Access EID in background thread to avoid blocking UI.

Bug: 153407357
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=SimStatusDialogControllerTest
Change-Id: Id30851bbd0b0fe080ed703586f9718be8b97abdd
2020-05-07 14:16:59 +08:00
Kevin Maurin
cabe76debc Display "Android Auto" in Connected Devices summary text.
Android Auto will be exposing a Settings tile under Connected Devices -> Connection Preferences.
If the Setting tile is available, then the summary text will reflect that.

Tested with additional unit tests and manually validated the scenarios by
flashing crosshatch-eng and disabling/enabling the relevant features.

Fix: 153896447
Test: Added unit coverage for new scenarios
Test: make RunSettingsRoboTests
Test: manually verified by flashing crosshatch-eng and disabling/enabling relevant components
Change-Id: I5a129c41b98ba435bc159a72c9a7c2dfd646ecd3
2020-05-06 21:42:43 -07:00
govenliu
1e0d40f2bd [Wi-Fi] Enhance Wifi Settings unit test cases.
Add new unit test cases in
1. WifiP2pSettingsTest.java
2. WifiConfigController2Test.java
3. WifiP2PPreferenceControllerTest.java
4. WifiP2pPeerTest.java

the coverage rate of
1. com.android.settings.wifi will raise from 44% to 45%
2. com.android.settings.wifi.P2p will raise from 69% to 85%

Bug: 151696220
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pSettingsTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pPeerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2PPreferenceControllerTest
Change-Id: I365494e1654376b23b08f18b1a799ffc59323a4c
2020-05-07 12:13:02 +08:00
tim peng
b8e18b4fb1 Merge "Update "Play media to" to "Play <APP> on"" into rvc-dev 2020-05-07 02:33:19 +00:00
Fabian Kozynski
69ee49c8d1 Fix default for CONTROLS_ENABLED
The default value for this setting if it doesn't exist is 1.

Test: Robotest PowerMenuPrivacyPreferenceControllerTest
Fixes: 155877682
Change-Id: I9025ea9c4f67492220f9ed67e11a167a65a99ec7
2020-05-06 12:36:18 -04:00
Yanting Yang
172f4064a9 Hide the app details preference for mainline module apps
For mainline module apps, user can not install them from the play store.
We should not provide the play store link for them in app info page.
Therefore, we decide to hide their app details preference which is to
provide the play store link from the app info page.

Bug: 152718521
Test: visual and robotests
Change-Id: I46b64be0d725740c2b80a5251a42e9fc834e4596
2020-05-06 20:56:51 +08:00
Tim Peng
901e1503f5 PanelSlicesAdapterTest failure
-Update test cases

Bug: 11390111
Test: make -j50 RunSettingsRoboTests
Change-Id: I6efd6b619eb5bc20b654a73bf1963ea9f446516d
2020-05-06 11:32:57 +00:00
TreeHugger Robot
53c6c9a672 Merge "Stop usb tethering when user cancel it" into rvc-dev 2020-05-06 10:52:09 +00:00
Yi-Ling Chuang
153b336baa Merge "Revert "Display "Android Auto" in Connected Devices summary text."" into rvc-dev 2020-05-06 10:49:53 +00:00
Yi-Ling Chuang
8258eb0327 Revert "Display "Android Auto" in Connected Devices summary text."
This reverts commit 6fb790b092.

Reason for revert: This CL causes test failures. Per Settings convention, revert the CL first.

Bug: 155829041
Change-Id: I486e09b63c9999b56d4359a7ec211fe8a6c89181
2020-05-06 10:37:47 +00:00
hughchen
9546b7fdcb Stop usb tethering when user cancel it
- Call stop tethering to clear entitlement result when user do not want
  using USB tethering on USB menu.
- Add test case

Bug: 154933817
Test: make -j42 RunSettingsRoboTests
Change-Id: Idaaba8df2052f45e710c7959251817e8947a544f
2020-05-06 16:02:35 +08:00
tim peng
4ed5c3aac4 Merge "Add 12dp padding above the first slice item" into rvc-dev 2020-05-06 05:00:36 +00:00
Tim Peng
2ef5a87f36 Update "Play media to" to "Play <APP> on"
-Update in Volume panel and Sound settings
-Add test cases

Bug: 155345595
Test: make -j50 RunSettingsRoboTests
Change-Id: Id971038ddbf22924a747e4e1be3597face7ec6ed
2020-05-06 10:17:15 +08:00
Tim Peng
2f47d771fb Add 12dp padding above the first slice item
-Add an extra padding in adapter for dedicated panels
-Add test cases

Bug: 154181365
Test: manual test
make -j50 RunSettingsRoboTests
"adb shell am start -a android.settings.panel.action.INTERNET_CONNECTIVITY"

Change-Id: I65bc26c23ca5a7f1b433c36ac7ddf1a658793719
2020-05-06 09:04:25 +08:00
TreeHugger Robot
6e68e34f2a Merge "Remove duplicate result for dark mode" into rvc-dev 2020-05-06 00:42:10 +00:00
Kevin Maurin
6fb790b092 Display "Android Auto" in Connected Devices summary text.
Android Auto will be exposing a Settings tile under Connected Devices -> Connection Preferences.
If the Setting tile is available, then the summary text will reflect that.

Tested with additional unit tests and manually validated the scenarios by
flashing crosshatch-eng and disabling/enabling the relevant features.

Fix: 153896447
Test: Added unit coverage for new scenarios
Test: make RunSettingsRoboTests
Test: manually verified by flashing crosshatch-eng and disabling/enabling relevant components
Change-Id: I05e0bca1b4c05939114703f868b1c71b76410532
2020-05-05 14:05:05 -07:00
András Klöczl
509ae917a4 Merge "Improve multi user settings screen" into rvc-dev 2020-05-05 17:27:42 +00:00
Tsung-Mao Fang
ae9dc54c56 Remove duplicate result for dark mode
We only keep the one in display settings.

Test: robo test and search dark mode in settings search.
Fix: 155735315
Change-Id: I71041f473944e854ef4601063658021bb9411069
2020-05-05 21:08:37 +08:00
Andras Kloczl
d19dc306dd Improve multi user settings screen
- Added switch and user delete functionality to details screen.
- Added robo tests.

Screenshots: http://shortn/_S6fbIMhAYO
Bug: 142798722
Test: Run robo tests with this command:
  make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.users.*SettingsTest"
Change-Id: Id51c12c5470e30e2dffe93f3bd8c22380d8bdc1f
2020-05-05 13:45:01 +01:00
Jason Chiu
2e5da48c7f Merge "Reload homepage cards when necessary" into rvc-dev 2020-05-05 10:04:09 +00:00
Jason Chiu
e0327ee583 Reload homepage cards when necessary
Many users leave Settings app by pressing Home key, but Settings remains
in the same card status and doesn't update when users come back, which
may lead to a bad UX.

This change reloads cards and resets the UI session for some events,
including home key, recent app key, and screen off.

Fixes: 151789260
Test: robotest
Change-Id: Idb575cef4a58894984cb42238d7b3b43c49389a3
2020-05-05 10:03:49 +00:00
TreeHugger Robot
18490b2dc8 Merge "Enable some settings pages to use paralleled-loading method" into rvc-dev 2020-05-05 09:23:13 +00:00
TreeHugger Robot
15254e3b5e Merge "Fix broken test cases" into rvc-dev 2020-05-04 11:12:50 +00:00
Tsung-Mao Fang
17b882a94d Fix broken test cases
Since we added a new API in ag/11355641,
we need to shadow this new new API.

Fix: 130916962
Test: run robo test
Change-Id: I2176253aae915d1a31043ebbf197d4dd1b1f2072
2020-05-04 17:22:01 +08:00
tim peng
1424b594c9 Merge "Modify rule of remote media session UI" into rvc-dev 2020-05-04 08:47:41 +00:00
Tim Peng
e9b91f08c4 Modify rule of remote media session UI
-Add preference by remote session in Sound Setting
-Add slice item by remote session in Volume panel
-Replace media device data with media session data
-Add test case

Bug: 154918214
Test: make -j50 RunSettingsRoboTests
Change-Id: Ib1c873c9f99eebcba377f4115c4b9b4297b20c3d
2020-05-04 12:21:20 +08:00
Lucas Dupin
7dc7252c15 Merge "Create QS media player setting" into rvc-dev 2020-05-04 03:59:28 +00:00
Sunny Shao
6d60248053 Enable some settings pages to use paralleled-loading method
- Here these pages include AppInfoDashboardFragment, ConnectedDeviceDashboardFragment,
  DevelopmentSettingsDashboardFragment, NetworkDashboardFragment, ConfigureNotificationSettings.
- The TimeSpentInAppPreferenceController use the LiveDataController.

Fixes: 135299529
Bug: 137558156
Test: compilation
Change-Id: I455a16536c9966184f1b2bd81d1f1217f3e09f9d
2020-05-04 10:34:23 +08:00
Arc Wang
7e40584e5d Merge "[Wi-Fi] Enhance com.android.settings.wifi.p2p unit test cases." into rvc-dev 2020-05-01 04:52:30 +00:00
govenliu
4d74ae2e67 [Wi-Fi] Enhance com.android.settings.wifi.p2p unit test cases.
Add new unit test cases in WifiP2pSettingsTest.java, the coverage rate will raise from 30% to 71%.

Bug: 151696220
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pSettingsTest
Change-Id: I214866efae47a99e75178beca48deb398b70f9bd
2020-05-01 09:00:10 +08:00
Lucas Dupin
665c36eae2 Create QS media player setting
Test: make RunSettingsRoboTests ROBOTEST_FILTER=QuickSettingsMediaPlayerPreferenceControllerTest
Test: manual
Fixes: 155315021
Change-Id: I2583b985710898d0480f599fc9b5a2451c8950a7
2020-04-30 12:04:23 -07:00
Yanting Yang
459e5e1636 Merge "Fix NPE crash when opening the app info from shortcut suggestion" into rvc-dev 2020-04-30 13:17:01 +00:00
Jason Chiu
5b260b0bd1 Merge "Refine contextual Bluetooth card behavior when Bluetooth is off" into rvc-dev 2020-04-30 10:44:06 +00:00
Blake Kragten
6fe60521d1 Merge "Remove enhanced connectivity switch for non-pixel" into rvc-dev 2020-04-30 03:24:52 +00:00
Yanting Yang
9dc0a45fd8 Fix NPE crash when opening the app info from shortcut suggestion
It occurs NPE in invoking refreshUi() of AppButtonsPreferenceController
when user fully install the instant app from google play and then
directly open app info from the shortcut suggestion in launcher.

Root cause:
AppButtonsPreferenceController.refreshUi() will be invoked when user
directly open app info from the shortcut suggestion in launcher. In
refreshUi(), we will update the information of button preference, but
the preferences will not be initialized if device existed an instant
version for the app.

Solution:
Check button preference and initial them if need in refreshUi().

Fixes: 137854835
Test: visual, robotests
Change-Id: Id5c3e53b9db2683cab970c10eace7925d889eea3
2020-04-30 08:53:16 +08:00
Julia Reynolds
e2eb832033 Merge "Remove unused development setting" into rvc-dev 2020-04-29 15:25:24 +00:00