Commit Graph

5788 Commits

Author SHA1 Message Date
Matthew Fritze
fa816e5487 Merge "Add getDescendants to Settings Slice Provider" into pi-dev am: 1257466d0b
am: 9b916e43aa

Change-Id: I80281ec8e58c44cde2dd3bbf7aead88e2c7154dc
2018-04-17 14:27:56 -07:00
TreeHugger Robot
24048a5ee1 Merge "WallpaperTypeSettings use DashboardFragment" 2018-04-17 20:55:26 +00:00
TreeHugger Robot
2ff24e3829 Merge "Migrate UserDictionaryList to DashboardFragment" 2018-04-17 20:53:35 +00:00
Mill Chen
f4b328e723 WallpaperTypeSettings use DashboardFragment
- Build a controller to generate/manage a list of preferences.
- Move some logics to the controller and add tests.

Bug: 73899467
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wallpaper
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
Test: atest SettingsGatewayTest UniquePreferenceTest
Change-Id: I519a76ff34bcd4195b0ad6ad406a8f66371923d2
2018-04-17 13:02:08 -07:00
Lei Yu
710d5fc886 Force update all suggestions but app restriction
When there is configuration change(icicle is not null), still
force update all suggestion except app restriction.

App restriction is not stateless: state HANDLED only happens when
there is anomaly and it disappear in next cycle. So we should only
update it when necessary.

Change-Id: Ifb7a1c477962a0c78b5455a5fbc078590fd408f2
Fixes: 77973093
Test: RunSettingsRoboTests
2018-04-17 12:41:25 -07:00
Emily Chuang
5e3718d354 Migrate UserDictionaryList to DashboardFragment
- Build a controller to generate/manage a list of preferences.
- Move some logics to the controller and add tests.

Test: manual
Test: make RunSettingsRoboTests -j
      atest UniquePreferenceTest SettingsGatewayTest
Change-Id: Ia3d885cb8917c7d5498b87818e24b938f0d95dbb
2018-04-17 12:27:24 -07:00
TreeHugger Robot
1257466d0b Merge "Add getDescendants to Settings Slice Provider" into pi-dev 2018-04-17 19:21:20 +00:00
Matthew Fritze
ba7c8e61ce Merge "Update a Slice Uri when unavailable" into pi-dev am: 1ee83ac460
am: 3f82559732

Change-Id: I9924d4a2fe8ce0e9b1eadf27c72f5039abf7265f
2018-04-17 12:17:08 -07:00
TreeHugger Robot
1ee83ac460 Merge "Update a Slice Uri when unavailable" into pi-dev 2018-04-17 18:45:39 +00:00
Salvador Martinez
d35c8d6706 Update preference to set password field
The preference for the wifi tether password was having the input
type set incorrectly. This could lead to strange keyboard behavior
and the password being remembered by the keyboard which is bad.
This CL sets the appropriate field where needed.

Test: robotests
Bug: 77853620
Change-Id: I2a72fc863cd3779aed98a0df95500b652bb51cc8
2018-04-17 11:02:44 -07:00
Matthew Fritze
6730a061b1 Add getDescendants to Settings Slice Provider
getDescendants allows another app to collect a list
of all valid Uris for Settings Slices. Important for search,
assistant or launcher apps.

This means searching our database for all valid keys and building
a list of Uris for each of those keys.

Fixes: 77808328
Test: robotests
Change-Id: I3ae27e4661a7dcaab50b091ae2730013118af8a2
2018-04-17 10:48:53 -07:00
Matthew Fritze
7acd13f3e4 Update a Slice Uri when unavailable
When a slice becomes unavailable, it should not update the
underlying data even if the view has not changed.

When we receive a change from an unavailable slice, notifychange
on the Uri and do not change the underlying data.

Change-Id: I91851ab668e4aece669fd65c14e0dc4ec2edefdf
Fixes: 77980406
Test: robotests
2018-04-17 10:43:26 -07:00
Matthew Fritze
a711ed8330 Add A11y Slices
Add AccessibilityPreferenceController, which wraps all a11y settings
since they are share common infrastructure for enabling, current value,
and availability.

We add an overlay for OEMs to declare their bundled a11y services.
This is the only list of services that will be possible to enabled via
Settings slices.

Accessibility Slices are built by getting a list of valid services,
and indexing the service names as a key in the Slices DB. When they are
built at runtime, they use the generic A11yPrefController to get the status
and enable/disable the service.

Bug: 67997836
Bug: 67997672
Test: robotests
Change-Id: I66f905bf1c55eecb937945c4675c12bcbc96d698
2018-04-17 10:27:02 -07:00
Jeff Chang
91d3e727e2 The Google specific bits should not in AOSP tests.
Remove the "Support & tips" which only exist in Google setting.

Bug:77981983

Test: atest SettingsUITests -j40

Change-Id: I97bdc6d157da85b382b0ee8a655085bda3ceac80
2018-04-17 10:46:15 +00:00
HJ ChangLiao
f3be34e01b Move device detail edit button from menu to header
Move the edit button on Bluetooth device detail,
From action bar menu to header.
Use EntityHeaderController to add and control,
Rename those method because we use them on
more than one place now.

Change-Id: I3afad6baeab80895c109603e2ab13428582a4dd8
Fixes: 76206922
Test: make RunSettingsRoboTests
2018-04-17 12:33:01 +08:00
Mehdi Alizadeh
ccec4e830c Remove swipe up setting page if the feature is not available am: e848603807
am: 788bf1dd39

Change-Id: I75e9ac7d96ce99f42abe2c91aed659dca0607112
2018-04-16 20:04:36 -07:00
Pengquan Meng
dd06c985c3 Merge "Fixed ApnEditor crash issue" into pi-dev am: c670be956c
am: 755426d7d8

Change-Id: I575e6775a47a2cd8b8bff3e2ab55309744a72e0a
2018-04-16 19:43:38 -07:00
Mehdi Alizadeh
e848603807 Remove swipe up setting page if the feature is not available
Bug: 77974864
Test: Manual test and RoboTests
Change-Id: Ie23a01f254d65e5888f91b5b1cb80df40976c569
2018-04-17 02:14:48 +00:00
Lei Yu
d0a1e0af1d Merge "Hide suggestion if app already been restricted" into pi-dev am: 1d5d289d08
am: 3f3c3c1c70

Change-Id: Ibc8a5d5ee7e52ffdeb364061afcf3af6e0b2366a
2018-04-16 19:01:41 -07:00
Pengquan Meng
c670be956c Merge "Fixed ApnEditor crash issue" into pi-dev 2018-04-17 01:26:54 +00:00
TreeHugger Robot
1d5d289d08 Merge "Hide suggestion if app already been restricted" into pi-dev 2018-04-17 00:30:08 +00:00
TreeHugger Robot
cbcbb74a5d Merge "Migrate ManagedProfileSettings to DashboardFragment" 2018-04-16 22:56:55 +00:00
Lei Yu
9e6d649b3a Hide suggestion if app already been restricted
Change-Id: I89904575be0236a22e4ca403bedc6adfc6cc5708
Fixes: 78014551
Test: RunSettingsRoboTests
2018-04-16 13:31:59 -07:00
Caxton Chan
67ee923708 Merge "Add audio switch UI in sound settings" into pi-dev am: 03b8aa3a3c
am: 160c30151f

Change-Id: I23b4cc7431a38fc3314547393d190d3020d6f75f
2018-04-16 12:50:38 -07:00
jason_chiu
c69102d24e Migrate ManagedProfileSettings to DashboardFragment
- Move preference related logic to Controllers.
- Add some test cases for controllers.

Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.accounts
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
      atest SettingsGatewayTest UniquePreferenceTest
Change-Id: If4fcd7bf572672c886d5c91b2d15013817d1aa67
2018-04-16 12:35:01 -07:00
Caxton Chan
03b8aa3a3c Merge "Add audio switch UI in sound settings" into pi-dev 2018-04-16 19:24:31 +00:00
hughchen
5620d28f3f Merge "Implement audio switch UI" into pi-dev am: 5a2f73151e
am: 608d436da0

Change-Id: Iea47d84345cfd10388a4c2ad34d5cedcfe7eaeb6
2018-04-16 12:12:21 -07:00
TreeHugger Robot
5a2f73151e Merge "Implement audio switch UI" into pi-dev 2018-04-16 18:34:37 +00:00
Lei Yu
9a44eb6be7 Merge "Remove battery usage preference in app info page" into pi-dev am: ea7dd68480
am: e5b270a4dd

Change-Id: I394652b3b170625fc51f54d675c9a07d951a72a3
2018-04-16 10:59:36 -07:00
TreeHugger Robot
ea7dd68480 Merge "Remove battery usage preference in app info page" into pi-dev 2018-04-16 17:14:49 +00:00
Isha Bobra
ea72074ed7 Merge "Show only 1 entry for hearing aid devices without killing the activity." into pi-dev am: d87acaf3cf
am: 595cda2d14

Change-Id: I49973a65a31f5f79722c4e4841f2dcda34128edb
2018-04-16 10:03:34 -07:00
Isha Bobra
d87acaf3cf Merge "Show only 1 entry for hearing aid devices without killing the activity." into pi-dev 2018-04-16 16:42:33 +00:00
ryanywlin
63bdfa8998 Add audio switch UI in sound settings
- Build two controller to control list preferences.

- MediaOutputPreferenceController which allows switching
the media output between current device and connected
BT device supporting A2DP. It also controls disabling
media output switching during a call or cast mode.

- HandsFreeProfilePreferenceController which allows
switching between HFP-connected BT devices while in
on-call state.

- Add test cases for controllers.

Bug: 74130772
Test: make RunSettingsRoboTests ROBOTEST_FILTER="MediaOutputPreferenceControllerTest" -j56
Test: make RunSettingsRoboTests ROBOTEST_FILTER="HandsFreeProfileOutputPreferenceControllerTest" -j56
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j56

Change-Id: I37f5418442ce77e72cdff07f071ea519ab1047f3
2018-04-16 11:52:44 +08:00
hughchen
bd3e5de207 Implement audio switch UI
* Implement available media devices group
* Add AvailableMediaDeviceGroupController to realize UI, the user can see the all device that can be activated in this group.
* ConnectedDeviceGroupController change to show the device that cannot be activated but is connected.
* Refactoring the below class, implement the controller in connected_devices.xml.
  ConnectedDeviceGroupController.java
  SavedDeviceGroupController.java
  ConnectedDeviceDashboardFragment.java
  connected_devices.xml
* Add AvailableMediaBluetoothDeviceUpdaterTest to verify the add/remove preference behavior when connectedStateChanged or profileAudioStateChanged
* Add test that used to verify device is connected or not in BluetoothDeviceUpdaterTest.
* Add test that used to verify the add/remove preference behavior when connectedStateChanged or profileAudioStateChanged in ConnectedBluetoothDeviceUpdaterTest.
* Add AvailableMediaDeviceGroupControllerTest to verify bluetooth feature is supported or not and test register callback.
* Add test that used to verify bluetooth feature is supported or not and test register callback in ConnectedDeviceGroupControllerTest.
* Add test that used to verify bluetooth feature is supported or not and test register callback in SavedDeviceGroupControllerTest

Bug: 74134939
Test: make -j40 RunSettingsRoboTests
Change-Id: I54d03c2ddadc6a4be7519dd74cdbcb5055d44083
2018-04-15 04:22:25 +00:00
Andrew Sapperstein
4eae68681c Merge "Remove menu from Network & Internet screen." into pi-dev am: 23035d558a
am: 3fdfb99375

Change-Id: I88a8e8d7ee77bafb5b8180d6d882d1ed9c09bd1f
2018-04-14 18:18:53 -07:00
Pengquan Meng
7c9f3ff74e Fixed ApnEditor crash issue
This root caused is that we closed the managed cursor which lifecycle is
managed by Activity.

Actually, we don't need the managed cursor in this case, just use the
normal cursor and close it after we got the apn data from the database.

Bug: 77894798
Test: make ROBOTEST_FILTER=ApnEditorTest -j40 RunSettingsRoboTests
Change-Id: I6eb80bbd53354e00e871e974f520668dcbceac63
2018-04-13 17:55:15 -07:00
TreeHugger Robot
ce53cbeef7 Merge "Update bluetooth preference to take user to new screen" into pi-dev 2018-04-13 23:00:52 +00:00
Isha Bobra
35e217f91f Show only 1 entry for hearing aid devices without killing the activity.
This CL tries to detect Bluetooth hearing aid devices and tries to
combine the entry of the hearing aids with the same HiSyncIds and
show only 1 entry for each pair in the connected devices list.

This CL also shows 2 battery status in the device details page.

This change shows the combined entry after a user returns to the
settings activity after pressing the back button or somehow
without killing it. It also combines the entries just after pairing.

Test: RunSettingsRoboTests
Bug: 74204427

Change-Id: I47fb0bdd96b1cc972d88a4aef85d0113985d63bb
2018-04-13 22:51:58 +00:00
Salvador Martinez
9eac182805 Update bluetooth preference to take user to new screen
This CL removes the toggle from the bluetooth preference and instead
takes users to a new dedicated screen for toggling bluetooth status.
On this screen we show a different summary text depending on whether
bluetooth and bluetooth scanning are on/off. Also, we were able to
delegate most of the UI/bluetooth handling to already existing
classes.

Test: robotests
Bug: 77543471
Merged-In: I036a3992bbd78896da8364b55ecc51afc4464b6e
Change-Id: I036a3992bbd78896da8364b55ecc51afc4464b6e
2018-04-13 15:07:45 -07:00
Lei Yu
6e96055232 Remove battery usage preference in app info page
Bug: 78011526
Test: RunSettingsRoboTests
Change-Id: I2dfb989167fe27857590f416fbb16d401e53bc1d
2018-04-13 14:41:03 -07:00
TreeHugger Robot
b0339949a3 Merge "Update bluetooth preference to take user to new screen" 2018-04-13 20:56:18 +00:00
Andrew Sapperstein
e358876bc1 Remove menu from Network & Internet screen.
Only one item was left "reset wi-fi, mobile & bluetooth"
which is also an option in Reset. So we're just removing
it so that there's no overflow menu at all.

Change-Id: I0298192667fb4ac2f58f51232ae2da1842e6c27e
Fixes: 77986130
Test: robotests
2018-04-13 13:48:05 -07:00
Daniel Nishi
cd01a3ecd9 Merge "Warn users before they change device name." into pi-dev 2018-04-13 19:31:15 +00:00
Fan Zhang
a3c0403c96 Merge "Support customizing icon color for externally items." into pi-dev am: 98a2064b61
am: 08becf87f4

Change-Id: I9392c7e8c00145437a2383864993a0b53791289b
2018-04-13 12:10:46 -07:00
Salvador Martinez
21c5ed2894 Update bluetooth preference to take user to new screen
This CL removes the toggle from the bluetooth preference and instead
takes users to a new dedicated screen for toggling bluetooth status.
On this screen we show a different summary text depending on whether
bluetooth and bluetooth scanning are on/off. Also, we were able to
delegate most of the UI/bluetooth handling to already existing
classes.

Test: robotests
Bug: 77543471
Change-Id: I036a3992bbd78896da8364b55ecc51afc4464b6e
2018-04-13 10:57:16 -07:00
TreeHugger Robot
98a2064b61 Merge "Support customizing icon color for externally items." into pi-dev 2018-04-13 17:48:22 +00:00
Fan Zhang
7aa626b59d Support customizing icon color for externally items.
When a setting is injected to homepage, we now allow the setting
provider customize the background color for its icon.

If no custom bg color is provided, we fallback to existing behavior.

This behavior is only needed in homepage, because we don't have any
tinting logic in other pages so external setting providers can just
provide arbitrary icon.

Bug: 77188317
Test: robotests
Change-Id: I7d4b512fafc28537de46192026ce4bbe51b498c4
2018-04-13 09:38:36 -07:00
Lei Yu
cc9c84646c Merge "Log app versionCode in anomaly detection" into pi-dev am: 70bd0c6d00
am: 471b71fb1c

Change-Id: I1fd2e48ed8f5eff66e2e1c8c97255a1894059097
2018-04-12 18:57:37 -07:00
Lei Yu
70bd0c6d00 Merge "Log app versionCode in anomaly detection" into pi-dev 2018-04-13 00:35:11 +00:00
Doris Ling
f045113476 Merge "Use a different string for vpn summary." into pi-dev am: a9261b4136
am: fe126d116b

Change-Id: Ia528e8bd3950776669f4b92f89729846d1bca719
2018-04-12 17:07:23 -07:00