Commit Graph

5285 Commits

Author SHA1 Message Date
Salvador Martinez
7ba65c39ae Make WifiTether listen to datasaver
Wifi Tethering is already turned off when appropriate. However
if you re-enable it you still can't toggle the tether switchbar.
This CL makes it so that if you disable data saver the toggle
becomes enabled again.

Test: robotests
Bug: 77860936
Change-Id: I03fa74c21674678a90cde7bd20fa68167f02ae3c
2018-04-20 02:56:47 +00:00
Matthew Fritze
f9f72e8c2c Update Slice APIs to current versions
Change-Id: Icf40673e518534487be77f33427df937717735e5
Fixes: 77982356
Test: robotests
2018-04-19 17:29:18 -07:00
TreeHugger Robot
d9abb0e914 Merge "Update Wifi Tether band selection UI" into pi-dev 2018-04-20 00:15:45 +00:00
Fan Zhang
0468f68c02 Merge "Format number to local locale." into pi-dev 2018-04-20 00:01:01 +00:00
Fan Zhang
040df90c50 Format number to local locale.
Change-Id: Iffa91eb8c40f09e5ac4cce10f355e348e62d8fce
Fixes: 78134172
Test: robotests
2018-04-19 15:54:39 -07:00
Salvador Martinez
10ba9c1786 Update Wifi Tether band selection UI
This CL updates the preference for selecting the enabled tether bands
to allow individual selection of multiple bands instead of forcing
a single selection. Note that while this makes the UI theoretically
support new bands in the future, the wifi backend only supports
selecting a single band or all bands which this CL does not address.

Test: robotests
Bug: 73102003
Change-Id: Ib2d4a2834c5cd11875515d308f7b20bfc8471959
2018-04-19 13:37:09 -07:00
Salvador Martinez
dbe38b09cf Merge "Fix restricted fragment dialogs" into pi-dev 2018-04-19 20:09:08 +00:00
Lei Yu
df5beee68b Hook up Adaptive Battery to new flag.
APP_STANDBY_ENABLED is controlled by server side to do experiment.
Before this CL, Adaptive Battery is hooked up to this flag, so
even though if user turns it off, it may be turned on by server.

Add a high level ADAPTIVE_BATTERY_MANAGEMENT_ENABLED to control
the feature in settings UI side.

Bug: 78153913
Test: RunSettingsRoboTests
Change-Id: I1a18d622ddc31ec4d45db918bf981516fbb926c1
2018-04-19 10:46:37 -07:00
Lei Yu
cff99cc2e3 Merge "update checkbox based on FAS API" into pi-dev 2018-04-19 17:01:23 +00:00
Beverly Tai
48831c837f Merge "Can disable checkbox without tint on text" into pi-dev 2018-04-19 16:57:05 +00:00
Beverly
49f7f8137f Can disable checkbox without tint on text
Fixes: 76101594
Test: DisabledCheckBoxPreferenceTest, ZenModeVisEffectPreferenceControllerTest
Change-Id: Ida92c7d94f788404d9cd48f07e779446d9ac0d54
2018-04-19 09:27:22 -04:00
Ivan Chiang
f2f03b8198 Add DockUpdaterFeatureProvider and DockUpdater.
Add the new feature components for dock devices.

Bug: 77931823
Test: Build
Change-Id: I219a5256d02f2b1b8ea7cce1cff4219975f2eae2
2018-04-19 16:04:08 +08:00
Salvador Martinez
950d94f689 Update settings main page battery string
UX requested that the percentage be moved to the front.

Test: robotests pass
Bug: 77874406
Change-Id: I7008c81fa42487bb71ecd84b6a66203d89fe50a8
2018-04-18 18:26:36 -07:00
Salvador Martinez
8c975b7bc0 Fix restricted fragment dialogs
The dialog for a setting being restricted was showing even when the
password was being entered correctly. This CL makes it so that
if the password is correctly entered we dismiss the dialog if it
is up.

Test: robotests
Bug: 77722622
Change-Id: Ifc82bc1e5800afff2a0883a13bf316f84169d80d
2018-04-18 18:04:13 -07:00
TreeHugger Robot
27441a984a Merge "Fixing incorrect method to launch mobile data plan app." into pi-dev 2018-04-18 23:49:31 +00:00
TreeHugger Robot
68ef601059 Merge "Force update all suggestions but app restriction" into pi-dev 2018-04-18 18:09:58 +00:00
Lei Yu
98eb902ead update checkbox based on FAS API
Before this CL, we assumed all the apps in this page were restricted and
didn't consider that user may uncheck one and rotate the screen.

In this CL, when we create checkbox, we will update the state through
FAS API to make sure checkbox is up-to-date.

Change-Id: I4e89908591f0688b4170806db4b6631bf921f2e9
Fixes: 78161466
Test: RunSettingsRoboTests
2018-04-18 10:58:06 -07:00
Julia Reynolds
f3290eafce Expand channel settings if coming from app
Test: manual inspection
Change-Id: I2ed7f5cc2355f27e0edf36a0d8ee23e418eafd99
Fixes: 77648459
2018-04-18 12:17:33 -04:00
TreeHugger Robot
bc4c392ff4 Merge "Add A11y Slices" into pi-dev 2018-04-18 01:44:58 +00:00
Jan Nordqvist
d4c7973615 Fixing incorrect method to launch mobile data plan app.
Bug: 77529772

Test: manual
Change-Id: Id102cb11bcbcc94b139caff47195364e281850e3
2018-04-17 18:21:25 -07:00
ryanywlin
7be15cdd23 Identify cast mode properly in audio switch
- Use STREAM_MUSIC to idetify cast mode

- Use STREAM_MUSIC to detect wired headset

Bug: 78141750
Test: make RunSettingsRoboTests
ROBOTEST_FILTER="MediaOutputPreferenceControllerTest" -j40

Change-Id: I92273d41d3debfc3d6327c4ca09143a2dd9b1cb6
2018-04-17 23:47:42 +00:00
TreeHugger Robot
a46dd4bd4b Merge "Replace deprecated APIs in audio switcher." into pi-dev 2018-04-17 23:10:44 +00:00
TreeHugger Robot
13c45045de Merge "Update preference to set password field" into pi-dev 2018-04-17 22:58:54 +00:00
TreeHugger Robot
3e3b496738 Merge "Update icon for security settings." into pi-dev 2018-04-17 22:33:26 +00:00
ryanywlin
dca308e56d Replace deprecated APIs in audio switcher.
- Remove isWiredHeadsetOn() and isBluetoothA2dpOn()
in MediaOutputPreferenceController.

- Remove isWiredHeadsetOn() and isBluetoothScoOn()
in HandsFreeProfileOutputPreferenceController.

- Replace with AudioManager.getDevicesForStream().

- Update test cases.

Bug: 78141441
Test: make RunSettingsRoboTests ROBOTEST_FILTER="MediaOutputPreferenceControllerTest" -j40
Test: make RunSettingsRoboTests ROBOTEST_FILTER="HandsFreeProfileOutputPreferenceControllerTest" -j40
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j40
Change-Id: Ic57c40badf0fd5633f1b7412d63a0b5417d0f47a
2018-04-18 05:57:27 +08:00
Doris Ling
f2dce9fac2 Update icon for security settings.
- also fix the issue of dynamic tile icon is being cached and not
updated properly.

Change-Id: I9289260340c1cddc4123fda88c366d658a11ddfc
Fixes: 74255242
Test: visual
2018-04-17 14:33:15 -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
TreeHugger Robot
1257466d0b Merge "Add getDescendants to Settings Slice Provider" into pi-dev 2018-04-17 19:21:20 +00: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
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
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
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
03b8aa3a3c Merge "Add audio switch UI in sound settings" into pi-dev 2018-04-16 19:24:31 +00:00
TreeHugger Robot
5a2f73151e Merge "Implement audio switch UI" into pi-dev 2018-04-16 18:34:37 +00: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
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
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
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