Commit Graph

42876 Commits

Author SHA1 Message Date
gomo
e17c9406f0 Add developer option control for GNSS duty cycling.
Duty Cycling control is one of the Android-P features. In Android-P the
feature will be controlled via a Developer Options button with no
public API. This CL adds the button and connect it to be read via the
GnssLocationProivder to control the feature. Also Roboelectric test
added.

Bug: 64009176
Test: Tested on Android-P build and works as expected. Also Robolectric test added.
Change-Id: Icc0d259719cf9034caf2c78c790b914ab4292597
2017-12-13 17:29:23 -08:00
Roshan Pius
f1f209f162 Settings: Add LOCAL_MAC_ADDRESS permission
This permission is needed for displaying the WIFI MAC address.

Bug: 70638295
Test: Wifi network details page shows the wifi MAC address.
Change-Id: I5fc95699190518e6ca8cfbda16576fedd1c34d83
2017-12-13 16:20:18 -08:00
Ben Lin
d11d08658f Hide Location Mode from search results if it's not available.
Test: make RunSettingsRoboTests ROBOTEST_FILTER=LocationModeTest all
passes.
Bug: 70283459
Change-Id: Id99d4a8f694b6f223ee8ead9701569840e333a9e
2017-12-13 16:03:27 -08:00
Philip P. Moltmann
bfaec28943 Merge "Switch to modern ArgumentMatchers" 2017-12-13 23:40:08 +00:00
TreeHugger Robot
17006451fb Merge "Add Slices Data object and DB Contract" 2017-12-13 23:01:36 +00:00
TreeHugger Robot
d6d292554c Merge "Simplify DND Behavior secondary text" 2017-12-13 22:59:43 +00:00
Doris Ling
70aaa94bb2 Add preference controller for app action buttons.
- move code related to initializing/refreshing the action buttons from
AppInfoDashboardFragment into a new controller.

Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: I8eb5f42a1b6d3c35f5a9e1356a9e5e31f643d5d3
2017-12-13 14:44:38 -08:00
TreeHugger Robot
aceacf5d43 Merge "Move AppInfoDashboardFragment into appinfo package." 2017-12-13 21:22:36 +00:00
Beverly
69294a5d5c Simplify DND Behavior secondary text
Bug: 63077372
Change-Id: I0ac305ff429de27a65667441703b938305d8a03f
Fixes: 70627215
Test: make ROBOTEST_FILTER=ZenModeSettingsTest RunSettingsRoboTests -j40
2017-12-13 15:23:03 -05:00
James Lemieux
d9d4fda9fe Merge "Adopt robolectric 3.5.1" 2017-12-13 19:31:37 +00:00
Matthew Fritze
7fddfebf6c Add Slices Data object and DB Contract
Add in a Data object used to represent one row
in a new SQLite database used for building Slices.

The database has the following schema:
- Key
- Title
- Subtitle
- Screentitle
- Icon
- Fragment
- Controller

The key is the preference key.
Title, subtitle and Icon are for UI info.
Screentitle and fragment are for the intent.
Controller is used to get dynamic ui info (like summary),
and to take actions on the slice (like a toggle).

The actual indexing and a Slice will be handled in a subsquent CL,
but a prototype can be found here: ag/3324435

Test: robotests
Bug: 67996923
Change-Id: Id91deb58a3ab89ce1dab5a3f34cdb9ade6263aa8
2017-12-13 10:59:47 -08:00
Peter Visontay
11bfef660c Add a unit test for the AppOps permission for displaying UI overlays.
The test logic is the same as ExetrnalSourcesSettingsTest but I moved/renamed some methods so both AppOps tests can use them.

Test: make -j32 SettingsUnitTests && adb install -r out/target/product/marlin/data/app/SettingsUnitTests/SettingsUnitTests.apk && adb shell am instrument -w -e class com.android.settings.applications.ExternalSourcesSettingsTest com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
Test: same as above, but for DrawOverlaySettingsTest
Change-Id: Ifc0f0985a4cb4a82a00839aeb4cd4216c777250e
2017-12-13 18:54:53 +00:00
Jordan Liu
567493a35c Merge "Add signal strength customization" 2017-12-13 18:20:08 +00:00
jackqdyulei
73abbc19c3 Add PowerUsageSummaryLegacy to Restricted list.
Then in guest/secondary user it is also possible to show
battery settings.

Bug: 70606597
Test: Manual
Change-Id: I7993abbf988926d0890229e9c14c779906be6e23
2017-12-13 10:19:47 -08:00
Robin Lee
3637f7a6b3 Merge "Handle getActiveAdmins() == null safely." am: d46153c3d3 am: 70a6dfd647
am: df5053e85b

Change-Id: I8f01cd4716ead11e7671e5fa572b8cd01087899c
2017-12-13 17:31:16 +00:00
Robin Lee
df5053e85b Merge "Handle getActiveAdmins() == null safely." am: d46153c3d3
am: 70a6dfd647

Change-Id: I98ccb0e4eb0882e10c0266d3f1fbbddaa1073db8
2017-12-13 17:28:34 +00:00
Robin Lee
70a6dfd647 Merge "Handle getActiveAdmins() == null safely."
am: d46153c3d3

Change-Id: If8a1bcdaa5c106394e4c00add45765d27c80e0ef
2017-12-13 17:24:00 +00:00
Treehugger Robot
d46153c3d3 Merge "Handle getActiveAdmins() == null safely." 2017-12-13 17:16:38 +00:00
Android Build Merger (Role)
4b721bc91d Merge "Import translations. DO NOT MERGE am: 1d6d60f251 -s ours" into oc-mr1-dev am: ad44ea442b -s ours
am: 937902f2f5  -s ours

Change-Id: Ibd076af118eb15993d7ecf37dbbcd77f371f892e
2017-12-13 13:25:18 +00:00
Bill Yi
76068a3a0a Import translations. DO NOT MERGE am: e30af484ff -s ours
am: b63129a388  -s ours

Change-Id: I1ba68b8ecf7f17d813ffc6023fc0589b2eb08ff6
2017-12-13 13:24:40 +00:00
Android Build Merger (Role)
937902f2f5 Merge "Import translations. DO NOT MERGE am: 1d6d60f251 -s ours" into oc-mr1-dev
am: ad44ea442b  -s ours

Change-Id: I8d26666caaa62bb95fed60d484368fc5b191bdcd
2017-12-13 13:23:07 +00:00
Bill Yi
b63129a388 Import translations. DO NOT MERGE
am: e30af484ff  -s ours

Change-Id: If2100d09d2f2c16f27e3c77ecaeded8fee5ebc90
2017-12-13 13:22:04 +00:00
Android Build Merger (Role)
ad44ea442b Merge "Import translations. DO NOT MERGE am: 1d6d60f251 -s ours" into oc-mr1-dev 2017-12-13 13:19:40 +00:00
Bill Yi
ae0da91c1c Import translations. DO NOT MERGE
am: 1d6d60f251  -s ours

Change-Id: I3a20f9e9061dbaf15f5f61a3f5f0a146c128ff2e
2017-12-13 13:19:06 +00:00
TreeHugger Robot
8412f70f6c Merge "Fix crashes related to ExternalSourcesDetails." 2017-12-13 07:02:07 +00:00
TreeHugger Robot
10a1602421 Merge "Add power save action to BatteryBroadcastReceiver" 2017-12-13 02:54:59 +00:00
Hemant Gupta
6a386dc6c1 Merge "Bluetooth: Add support for PBAP UI preference" am: f689d1aaa7 am: 0b4c0ebbe4
am: 40069b5ee2

Change-Id: I57de94d04d73ed1af24a15b36a73ea0692ad9815
2017-12-13 02:26:01 +00:00
Wang wenrui
f5c8c66b76 Merge "Fix screen freeze when changing display size in Multi-Window mode" am: 2051822bb9 am: b2a6489139
am: 9b3b72f6b2

Change-Id: I4d3e3ef484d93535eb599104330048e1610cb370
2017-12-13 02:25:04 +00:00
Hemant Gupta
40069b5ee2 Merge "Bluetooth: Add support for PBAP UI preference" am: f689d1aaa7
am: 0b4c0ebbe4

Change-Id: I5419efe379ee5bf0622ac8070b6ef3886d277bdf
2017-12-13 01:57:51 +00:00
Wang wenrui
9b3b72f6b2 Merge "Fix screen freeze when changing display size in Multi-Window mode" am: 2051822bb9
am: b2a6489139

Change-Id: I791f25687e37448659b3e0d91ad35f28dca0fed6
2017-12-13 01:56:50 +00:00
James Lemieux
9453999e6f Adopt robolectric 3.5.1
Bug: 70581603
Test: make RunSettingsRoboTests
Change-Id: I21dba3381ae62ee12de1ce29bea473b3d0f069c0
2017-12-12 17:31:47 -08:00
Hemant Gupta
0b4c0ebbe4 Merge "Bluetooth: Add support for PBAP UI preference"
am: f689d1aaa7

Change-Id: Ic4ffc6a26b11cdf0a937402c3bdcd68441fe4aed
2017-12-13 01:27:46 +00:00
Wang wenrui
b2a6489139 Merge "Fix screen freeze when changing display size in Multi-Window mode"
am: 2051822bb9

Change-Id: I974abe3dd2114aa439c0db46fa4930a947912de6
2017-12-13 01:26:52 +00:00
Lei Yu
15b8b27646 Merge changes Ie1f934b4,Ic3b045a6
* changes:
  Create BluetoothSwitchPreference
  Add ConnectedUsbDeviceUpdater
2017-12-13 01:06:14 +00:00
Doris Ling
a0006d93bd Move AppInfoDashboardFragment into appinfo package.
- update all references to AppInfoDashboardFragment
- removed PackageUtil inner class and change the corresponding function
to be a simple method.

Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: Ief067e25a303ef16db20b2ca1d8840cb06eff5f9
2017-12-12 16:58:17 -08:00
TreeHugger Robot
fb72d22784 Merge "Add controllers for iinstant app related preferences." 2017-12-13 00:56:56 +00:00
jackqdyulei
5393991573 Add power save action to BatteryBroadcastReceiver
This cl makes BatteryBroadcastReceiver also listen to update about
battery saver.

Bug: 70530651
Test: RunSettingsRoboTests
Change-Id: I76b2f1b1047aa195ee9d8ff2a8a330cea31039d4
2017-12-12 16:56:22 -08:00
Treehugger Robot
f689d1aaa7 Merge "Bluetooth: Add support for PBAP UI preference" 2017-12-13 00:30:42 +00:00
Bill Yi
1d6d60f251 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: If249fffda6df063fd39ec95e4ba04b412a1ea9e1
2017-12-12 16:25:18 -08:00
Bill Yi
e30af484ff Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I37fb135ddf373093ede9b1d56bf6452ea52ef093
2017-12-12 16:19:14 -08:00
TreeHugger Robot
84e8c795b1 Merge "Add PrefController in XML support" 2017-12-13 00:02:35 +00:00
Treehugger Robot
2051822bb9 Merge "Fix screen freeze when changing display size in Multi-Window mode" 2017-12-12 23:59:23 +00:00
Adam Lesinski
6cbb463d18 Merge "Update the way OMS records details about overlays" into oc-mr1-dev am: 15b42b89b8
am: 11ab7f7b82  -s ours

Change-Id: I91e9d37fb5b4024f3272a7f968d7885ea88a2244
2017-12-12 23:35:34 +00:00
Adam Lesinski
11ab7f7b82 Merge "Update the way OMS records details about overlays" into oc-mr1-dev
am: 15b42b89b8

Change-Id: I15809e100fc46691f0f60ed2729c18a07d904313
2017-12-12 23:16:37 +00:00
Jeffrey Huang
de98ec50ec Merge "Do not show advanced dropdown if only one setting" 2017-12-12 22:27:05 +00:00
Doris Ling
e29587e334 Fix crashes related to ExternalSourcesDetails.
- ExternalSourcesSettingsTest crashes due to the package moved of
ExternalSourcesDetails. Corresponding xml has been updated in previous
CLs. So, reverting the suppress tag for the test class.
- ExternalSourcesDetails can be launched directly with
MANAGE_UNKNOWN_APP_SOURCES intent, and client can pass in invalid
package while launching ExternalSourcesDetails. Need to check whether
the app info is invalid before we try to launch the fragment.
- also fix test failure for not founding the app list as list object
type and id had been changed.

Change-Id: Id7787ca889f770e10d7a8e9fbf8dc79c9d6e884d
Fixes: 70383636
Test: make RunSettingsRoboTests, make SettingsUnitTests
2017-12-12 22:21:20 +00:00
Matthew Fritze
7d2b4f5fc7 Add PrefController in XML support
Add the ability to define a Preference Controller
in xml using the 'controller' tag.

This is useful for two reasons:
- It allows the controllers to be instantiated via
reflection for Slices and Dashboard fragment
- Removes the requirement that controllers be defined manually
in Fragments

In order to be instantiable, they must have a unified construction
following either:

  ClassName(Context)
  ClassName(Context, String)

Also added a robotest that verifies that all controllers defined
in XML follow the constructor schema, and extend
BasePreferenceController.

Test: robotests
Bug: 67996923
Change-Id: I304b35dc666daebecf0c9e286696f3f2a510704a
2017-12-12 14:21:12 -08:00
TreeHugger Robot
15b42b89b8 Merge "Update the way OMS records details about overlays" into oc-mr1-dev 2017-12-12 21:48:17 +00:00
Philip P. Moltmann
d27fe3275f Switch to modern ArgumentMatchers
Test: adb shell am instrument -w -e class com.android.settings.vpn2.PreferenceListTest com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner

Change-Id: Id2e4684f6d3048cfb60fee1f747d0796c157a3da
2017-12-12 13:07:21 -08:00
Doris Ling
6e447d69bc Add controllers for iinstant app related preferences.
For AppInfoDashboardFragment:
- add app installer preference into the preference screen
instead of creating it dynamically.
- add controller for the App Installer, Instant App buttons, and instant
app domains preferences.

Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: I8d362cacb78077c173130018c33c4d00abfe9843
2017-12-12 12:32:19 -08:00