OSDN Git Service

android-x86/packages-apps-Settings.git
6 years agoFix bug in SummaryLoader
jackqdyulei [Tue, 19 Dec 2017 22:09:29 +0000 (14:09 -0800)]
Fix bug in SummaryLoader

It should use msg.obj to detect whether to start listening, not
msg.arg1.

Bug: 70607303
Test: Build
Change-Id: I55c4d988f0ebb35f4be9039055eba7803c0b082f

6 years agoMerge "Respect DISALLOW_UNIFIED_PASSWORD in Settings."
Pavel Grafov [Fri, 15 Dec 2017 13:47:48 +0000 (13:47 +0000)]
Merge "Respect DISALLOW_UNIFIED_PASSWORD in Settings."

6 years agoMerge "Switch to modern ArgumentMatchers" am: b8bf3bbc72 am: ced2263d48
Philip P. Moltmann [Fri, 15 Dec 2017 12:00:25 +0000 (12:00 +0000)]
Merge "Switch to modern ArgumentMatchers" am: b8bf3bbc72 am: ced2263d48
am: e360d51476

Change-Id: I2fb154f48bcfedecb5dbd8ccb2792ba34366ed71

6 years agoMerge "Switch to modern ArgumentMatchers" am: b8bf3bbc72
Philip P. Moltmann [Fri, 15 Dec 2017 11:04:48 +0000 (11:04 +0000)]
Merge "Switch to modern ArgumentMatchers" am: b8bf3bbc72
am: ced2263d48

Change-Id: Iccb726dc2166bb1e30f39f7f6539fb74e1d83997

6 years agoMerge "Switch to modern ArgumentMatchers"
Philip P. Moltmann [Fri, 15 Dec 2017 10:48:38 +0000 (10:48 +0000)]
Merge "Switch to modern ArgumentMatchers"
am: b8bf3bbc72

Change-Id: I81455eceac3a4273dc0bfd439fefa21c3b6f571c

6 years agoMerge "Switch to modern ArgumentMatchers"
Treehugger Robot [Fri, 15 Dec 2017 10:33:13 +0000 (10:33 +0000)]
Merge "Switch to modern ArgumentMatchers"

6 years agoMerge "Clarify secondary dnd media text."
TreeHugger Robot [Thu, 14 Dec 2017 22:04:11 +0000 (22:04 +0000)]
Merge "Clarify secondary dnd media text."

6 years agoClarify secondary dnd media text.
Beverly [Thu, 14 Dec 2017 20:29:28 +0000 (15:29 -0500)]
Clarify secondary dnd media text.

Bug: 63077372
Test: manual
Change-Id: I38f249851fc5122e89dd3cc33124068598475751

6 years agoMerge "Hide Location Mode from search results if it's not available."
TreeHugger Robot [Thu, 14 Dec 2017 18:08:44 +0000 (18:08 +0000)]
Merge "Hide Location Mode from search results if it's not available."

6 years agoMerge "Add PowerUsageSummaryLegacy to Restricted list."
Lei Yu [Thu, 14 Dec 2017 18:05:11 +0000 (18:05 +0000)]
Merge "Add PowerUsageSummaryLegacy to Restricted list."

6 years agoSwitch to modern ArgumentMatchers
Philip P. Moltmann [Thu, 23 Nov 2017 00:07:48 +0000 (16:07 -0800)]
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

6 years agoMerge "Add developer option control for GNSS duty cycling."
TreeHugger Robot [Thu, 14 Dec 2017 15:49:17 +0000 (15:49 +0000)]
Merge "Add developer option control for GNSS duty cycling."

6 years agoMerge "Add a unit test for the AppOps permission for displaying UI overlays."
Peter Visontay [Thu, 14 Dec 2017 13:49:18 +0000 (13:49 +0000)]
Merge "Add a unit test for the AppOps permission for displaying UI overlays."

6 years agoMerge "Add preference controller for app action buttons."
TreeHugger Robot [Thu, 14 Dec 2017 02:07:39 +0000 (02:07 +0000)]
Merge "Add preference controller for app action buttons."

6 years agoAdd developer option control for GNSS duty cycling.
gomo [Wed, 13 Dec 2017 11:44:09 +0000 (03:44 -0800)]
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

6 years agoHide Location Mode from search results if it's not available.
Ben Lin [Wed, 6 Dec 2017 19:31:55 +0000 (11:31 -0800)]
Hide Location Mode from search results if it's not available.

Test: make RunSettingsRoboTests ROBOTEST_FILTER=LocationModeTest all
passes.
Bug: 70283459
Change-Id: Id99d4a8f694b6f223ee8ead9701569840e333a9e

6 years agoMerge "Switch to modern ArgumentMatchers"
Philip P. Moltmann [Wed, 13 Dec 2017 23:40:08 +0000 (23:40 +0000)]
Merge "Switch to modern ArgumentMatchers"

6 years agoMerge "Add Slices Data object and DB Contract"
TreeHugger Robot [Wed, 13 Dec 2017 23:01:36 +0000 (23:01 +0000)]
Merge "Add Slices Data object and DB Contract"

6 years agoMerge "Simplify DND Behavior secondary text"
TreeHugger Robot [Wed, 13 Dec 2017 22:59:43 +0000 (22:59 +0000)]
Merge "Simplify DND Behavior secondary text"

6 years agoAdd preference controller for app action buttons.
Doris Ling [Wed, 13 Dec 2017 22:12:27 +0000 (14:12 -0800)]
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

6 years agoMerge "Move AppInfoDashboardFragment into appinfo package."
TreeHugger Robot [Wed, 13 Dec 2017 21:22:36 +0000 (21:22 +0000)]
Merge "Move AppInfoDashboardFragment into appinfo package."

6 years agoSimplify DND Behavior secondary text
Beverly [Wed, 13 Dec 2017 20:08:30 +0000 (15:08 -0500)]
Simplify DND Behavior secondary text

Bug: 63077372
Change-Id: I0ac305ff429de27a65667441703b938305d8a03f
Fixes: 70627215
Test: make ROBOTEST_FILTER=ZenModeSettingsTest RunSettingsRoboTests -j40

6 years agoMerge "Adopt robolectric 3.5.1"
James Lemieux [Wed, 13 Dec 2017 19:31:37 +0000 (19:31 +0000)]
Merge "Adopt robolectric 3.5.1"

6 years agoAdd Slices Data object and DB Contract
Matthew Fritze [Mon, 11 Dec 2017 23:01:11 +0000 (15:01 -0800)]
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

6 years agoAdd a unit test for the AppOps permission for displaying UI overlays.
Peter Visontay [Wed, 13 Dec 2017 17:31:41 +0000 (17:31 +0000)]
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

6 years agoMerge "Add signal strength customization"
Jordan Liu [Wed, 13 Dec 2017 18:20:08 +0000 (18:20 +0000)]
Merge "Add signal strength customization"

6 years agoAdd PowerUsageSummaryLegacy to Restricted list.
jackqdyulei [Wed, 13 Dec 2017 18:18:23 +0000 (10:18 -0800)]
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

6 years agoMerge "Handle getActiveAdmins() == null safely." am: d46153c3d3 am: 70a6dfd647
Robin Lee [Wed, 13 Dec 2017 17:31:16 +0000 (17:31 +0000)]
Merge "Handle getActiveAdmins() == null safely." am: d46153c3d3 am: 70a6dfd647
am: df5053e85b

Change-Id: I8f01cd4716ead11e7671e5fa572b8cd01087899c

6 years agoMerge "Handle getActiveAdmins() == null safely." am: d46153c3d3
Robin Lee [Wed, 13 Dec 2017 17:28:34 +0000 (17:28 +0000)]
Merge "Handle getActiveAdmins() == null safely." am: d46153c3d3
am: 70a6dfd647

Change-Id: I98ccb0e4eb0882e10c0266d3f1fbbddaa1073db8

6 years agoMerge "Handle getActiveAdmins() == null safely."
Robin Lee [Wed, 13 Dec 2017 17:24:00 +0000 (17:24 +0000)]
Merge "Handle getActiveAdmins() == null safely."
am: d46153c3d3

Change-Id: If8a1bcdaa5c106394e4c00add45765d27c80e0ef

6 years agoMerge "Handle getActiveAdmins() == null safely."
Treehugger Robot [Wed, 13 Dec 2017 17:16:38 +0000 (17:16 +0000)]
Merge "Handle getActiveAdmins() == null safely."

6 years agoMerge "Import translations. DO NOT MERGE am: 1d6d60f251 -s ours" into oc-mr1-dev...
Android Build Merger (Role) [Wed, 13 Dec 2017 13:25:18 +0000 (13:25 +0000)]
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

6 years agoImport translations. DO NOT MERGE am: e30af484ff -s ours
Bill Yi [Wed, 13 Dec 2017 13:24:40 +0000 (13:24 +0000)]
Import translations. DO NOT MERGE am: e30af484ff  -s ours
am: b63129a388  -s ours

Change-Id: I1ba68b8ecf7f17d813ffc6023fc0589b2eb08ff6

6 years agoMerge "Import translations. DO NOT MERGE am: 1d6d60f251 -s ours" into oc-mr1-dev
Android Build Merger (Role) [Wed, 13 Dec 2017 13:23:07 +0000 (13:23 +0000)]
Merge "Import translations. DO NOT MERGE am: 1d6d60f251  -s ours" into oc-mr1-dev
am: ad44ea442b  -s ours

Change-Id: I8d26666caaa62bb95fed60d484368fc5b191bdcd

6 years agoImport translations. DO NOT MERGE
Bill Yi [Wed, 13 Dec 2017 13:22:04 +0000 (13:22 +0000)]
Import translations. DO NOT MERGE
am: e30af484ff  -s ours

Change-Id: If2100d09d2f2c16f27e3c77ecaeded8fee5ebc90

6 years agoMerge "Import translations. DO NOT MERGE am: 1d6d60f251 -s ours" into oc-mr1-dev
Android Build Merger (Role) [Wed, 13 Dec 2017 13:19:40 +0000 (13:19 +0000)]
Merge "Import translations. DO NOT MERGE am: 1d6d60f251  -s ours" into oc-mr1-dev

6 years agoImport translations. DO NOT MERGE
Bill Yi [Wed, 13 Dec 2017 13:19:06 +0000 (13:19 +0000)]
Import translations. DO NOT MERGE
am: 1d6d60f251  -s ours

Change-Id: I3a20f9e9061dbaf15f5f61a3f5f0a146c128ff2e

6 years agoMerge "Fix crashes related to ExternalSourcesDetails."
TreeHugger Robot [Wed, 13 Dec 2017 07:02:07 +0000 (07:02 +0000)]
Merge "Fix crashes related to ExternalSourcesDetails."

6 years agoMerge "Add power save action to BatteryBroadcastReceiver"
TreeHugger Robot [Wed, 13 Dec 2017 02:54:59 +0000 (02:54 +0000)]
Merge "Add power save action to BatteryBroadcastReceiver"

6 years agoMerge "Bluetooth: Add support for PBAP UI preference" am: f689d1aaa7 am: 0b4c0ebbe4
Hemant Gupta [Wed, 13 Dec 2017 02:26:01 +0000 (02:26 +0000)]
Merge "Bluetooth: Add support for PBAP UI preference" am: f689d1aaa7 am: 0b4c0ebbe4
am: 40069b5ee2

Change-Id: I57de94d04d73ed1af24a15b36a73ea0692ad9815

6 years agoMerge "Fix screen freeze when changing display size in Multi-Window mode" am: 2051822...
Wang wenrui [Wed, 13 Dec 2017 02:25:04 +0000 (02:25 +0000)]
Merge "Fix screen freeze when changing display size in Multi-Window mode" am: 2051822bb9 am: b2a6489139
am: 9b3b72f6b2

Change-Id: I4d3e3ef484d93535eb599104330048e1610cb370

6 years agoMerge "Bluetooth: Add support for PBAP UI preference" am: f689d1aaa7
Hemant Gupta [Wed, 13 Dec 2017 01:57:51 +0000 (01:57 +0000)]
Merge "Bluetooth: Add support for PBAP UI preference" am: f689d1aaa7
am: 0b4c0ebbe4

Change-Id: I5419efe379ee5bf0622ac8070b6ef3886d277bdf

6 years agoMerge "Fix screen freeze when changing display size in Multi-Window mode" am: 2051822bb9
Wang wenrui [Wed, 13 Dec 2017 01:56:50 +0000 (01:56 +0000)]
Merge "Fix screen freeze when changing display size in Multi-Window mode" am: 2051822bb9
am: b2a6489139

Change-Id: I791f25687e37448659b3e0d91ad35f28dca0fed6

6 years agoAdopt robolectric 3.5.1
James Lemieux [Wed, 13 Dec 2017 01:31:47 +0000 (17:31 -0800)]
Adopt robolectric 3.5.1

Bug: 70581603
Test: make RunSettingsRoboTests
Change-Id: I21dba3381ae62ee12de1ce29bea473b3d0f069c0

6 years agoMerge "Bluetooth: Add support for PBAP UI preference"
Hemant Gupta [Wed, 13 Dec 2017 01:27:46 +0000 (01:27 +0000)]
Merge "Bluetooth: Add support for PBAP UI preference"
am: f689d1aaa7

Change-Id: Ic4ffc6a26b11cdf0a937402c3bdcd68441fe4aed

6 years agoMerge "Fix screen freeze when changing display size in Multi-Window mode"
Wang wenrui [Wed, 13 Dec 2017 01:26:52 +0000 (01:26 +0000)]
Merge "Fix screen freeze when changing display size in Multi-Window mode"
am: 2051822bb9

Change-Id: I974abe3dd2114aa439c0db46fa4930a947912de6

6 years agoMerge changes Ie1f934b4,Ic3b045a6
Lei Yu [Wed, 13 Dec 2017 01:06:14 +0000 (01:06 +0000)]
Merge changes Ie1f934b4,Ic3b045a6

* changes:
  Create BluetoothSwitchPreference
  Add ConnectedUsbDeviceUpdater

6 years agoMove AppInfoDashboardFragment into appinfo package.
Doris Ling [Thu, 7 Dec 2017 23:30:18 +0000 (15:30 -0800)]
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

6 years agoMerge "Add controllers for iinstant app related preferences."
TreeHugger Robot [Wed, 13 Dec 2017 00:56:56 +0000 (00:56 +0000)]
Merge "Add controllers for iinstant app related preferences."

6 years agoAdd power save action to BatteryBroadcastReceiver
jackqdyulei [Tue, 12 Dec 2017 00:53:40 +0000 (16:53 -0800)]
Add power save action to BatteryBroadcastReceiver

This cl makes BatteryBroadcastReceiver also listen to update about
battery saver.

Bug: 70530651
Test: RunSettingsRoboTests
Change-Id: I76b2f1b1047aa195ee9d8ff2a8a330cea31039d4

6 years agoMerge "Bluetooth: Add support for PBAP UI preference"
Treehugger Robot [Wed, 13 Dec 2017 00:30:42 +0000 (00:30 +0000)]
Merge "Bluetooth: Add support for PBAP UI preference"

6 years agoImport translations. DO NOT MERGE
Bill Yi [Wed, 13 Dec 2017 00:25:18 +0000 (16:25 -0800)]
Import translations. DO NOT MERGE

Auto-generated-cl: translation import

Bug: 64712476
Change-Id: If249fffda6df063fd39ec95e4ba04b412a1ea9e1

6 years agoImport translations. DO NOT MERGE
Bill Yi [Wed, 13 Dec 2017 00:19:14 +0000 (16:19 -0800)]
Import translations. DO NOT MERGE

Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I37fb135ddf373093ede9b1d56bf6452ea52ef093

6 years agoMerge "Add PrefController in XML support"
TreeHugger Robot [Wed, 13 Dec 2017 00:02:35 +0000 (00:02 +0000)]
Merge "Add PrefController in XML support"

6 years agoMerge "Fix screen freeze when changing display size in Multi-Window mode"
Treehugger Robot [Tue, 12 Dec 2017 23:59:23 +0000 (23:59 +0000)]
Merge "Fix screen freeze when changing display size in Multi-Window mode"

6 years agoMerge "Update the way OMS records details about overlays" into oc-mr1-dev am: 15b42b89b8
Adam Lesinski [Tue, 12 Dec 2017 23:35:34 +0000 (23:35 +0000)]
Merge "Update the way OMS records details about overlays" into oc-mr1-dev am: 15b42b89b8
am: 11ab7f7b82  -s ours

Change-Id: I91e9d37fb5b4024f3272a7f968d7885ea88a2244

6 years agoMerge "Update the way OMS records details about overlays" into oc-mr1-dev
Adam Lesinski [Tue, 12 Dec 2017 23:16:37 +0000 (23:16 +0000)]
Merge "Update the way OMS records details about overlays" into oc-mr1-dev
am: 15b42b89b8

Change-Id: I15809e100fc46691f0f60ed2729c18a07d904313

6 years agoMerge "Do not show advanced dropdown if only one setting"
Jeffrey Huang [Tue, 12 Dec 2017 22:27:05 +0000 (22:27 +0000)]
Merge "Do not show advanced dropdown if only one setting"

6 years agoFix crashes related to ExternalSourcesDetails.
Doris Ling [Tue, 12 Dec 2017 01:32:03 +0000 (17:32 -0800)]
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

6 years agoAdd PrefController in XML support
Matthew Fritze [Mon, 11 Dec 2017 17:57:54 +0000 (09:57 -0800)]
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

6 years agoMerge "Update the way OMS records details about overlays" into oc-mr1-dev
TreeHugger Robot [Tue, 12 Dec 2017 21:48:17 +0000 (21:48 +0000)]
Merge "Update the way OMS records details about overlays" into oc-mr1-dev

6 years agoSwitch to modern ArgumentMatchers
Philip P. Moltmann [Thu, 23 Nov 2017 00:07:48 +0000 (16:07 -0800)]
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

6 years agoAdd controllers for iinstant app related preferences.
Doris Ling [Thu, 7 Dec 2017 20:38:04 +0000 (12:38 -0800)]
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

6 years agoAdd signal strength customization
Jordan Liu [Tue, 12 Dec 2017 01:19:45 +0000 (17:19 -0800)]
Add signal strength customization

Also add default behavior in case carrier config bundle is null.

Bug: 69730732
Test: manual and new unit test
Change-Id: Ia38462a7e1b6f2e27ff45d93beef09465a68ae5c

6 years agoDo not show advanced dropdown if only one setting
jeffreyhuang [Fri, 8 Dec 2017 22:39:03 +0000 (14:39 -0800)]
Do not show advanced dropdown if only one setting

Change-Id: I56eff1198636d0f0b95f4aa58eb90efc346c3f65
Fixes: 69402845
Test: make RunSettingsRoboTests -j40

6 years agoRespect DISALLOW_UNIFIED_PASSWORD in Settings.
Pavel Grafov [Thu, 26 Oct 2017 16:01:53 +0000 (17:01 +0100)]
Respect DISALLOW_UNIFIED_PASSWORD in Settings.

Bug: 63909482
Test: make ROBOTEST_FILTER=SecuritySettingsTest RunSettingsRoboTests
Test: make cts-verifier
Change-Id: Ia89501d5d5339c1340bee36a9bfb8ef72c4ee9b1

6 years agoMerge "Add device name preference in pairing page"
Lei Yu [Tue, 12 Dec 2017 18:05:34 +0000 (18:05 +0000)]
Merge "Add device name preference in pairing page"

6 years agoMerge "Update package name for PictureAndPictureSettings"
TreeHugger Robot [Tue, 12 Dec 2017 01:05:33 +0000 (01:05 +0000)]
Merge "Update package name for PictureAndPictureSettings"

6 years agoAdd device name preference in pairing page
jackqdyulei [Fri, 8 Dec 2017 20:55:26 +0000 (12:55 -0800)]
Add device name preference in pairing page

Also refactor the preference controller
1. Extend from BasePreferenceController.
2. pass in the preference key. Then it could be reused in different
places with different key.

Bug: 69333961
Test: Screenshot | RunSettingsRoboTests
Change-Id: I773ca022baa326481045c1659565c9a21111200a

6 years agoUpdate package name for PictureAndPictureSettings
Doris Ling [Mon, 11 Dec 2017 21:45:40 +0000 (13:45 -0800)]
Update package name for PictureAndPictureSettings

- also need to update the reference in the special app access xml page.

Change-Id: I1199f70adf18d3f0e21a946848239526d9c8b3c8
Fixes: 70491786
Test: make SettingsUnitTests

6 years agoMerge "Delete about phone v1 code"
TreeHugger Robot [Mon, 11 Dec 2017 22:51:42 +0000 (22:51 +0000)]
Merge "Delete about phone v1 code"

6 years agoMerge "Update the way OMS records details about overlays"
TreeHugger Robot [Mon, 11 Dec 2017 21:51:35 +0000 (21:51 +0000)]
Merge "Update the way OMS records details about overlays"

6 years agoCreate BluetoothSwitchPreference
jackqdyulei [Mon, 4 Dec 2017 21:57:31 +0000 (13:57 -0800)]
Create BluetoothSwitchPreference

In the new design, bluetooth preference is not MasterSwitchPreference
any more. This cl creates BluetoothSwitchPreference while reuse the
BluetoothEnabler.

Future cl will remove the BluetoothMasterSwitchPreference when P
feature is finalized.

Bug: 69333961
Test: RunSettingsRoboTests
Change-Id: Ie1f934b4e93a6758a1b0cf83bb5098585a635c2a

6 years agoMerge "Add icons for color inversion and daltonizer"
TreeHugger Robot [Mon, 11 Dec 2017 21:01:32 +0000 (21:01 +0000)]
Merge "Add icons for color inversion and daltonizer"

6 years agoMerge "Update package name for PictureAndPictureSettings"
TreeHugger Robot [Mon, 11 Dec 2017 20:59:58 +0000 (20:59 +0000)]
Merge "Update package name for PictureAndPictureSettings"

6 years agoMerge "Disable crashing ExternalSourcesSettingsTest#testManageExternalSourcesForApp"
TreeHugger Robot [Mon, 11 Dec 2017 20:33:48 +0000 (20:33 +0000)]
Merge "Disable crashing  ExternalSourcesSettingsTest#testManageExternalSourcesForApp"

6 years agoHandle getActiveAdmins() == null safely.
Robin Lee [Mon, 11 Dec 2017 17:24:03 +0000 (18:24 +0100)]
Handle getActiveAdmins() == null safely.

Test: adb install -r $OUT/system/priv-app/Settings/Settings.apk && adb shell am start -n com.android.settings/.DeviceAdminAdd --es android.app.extra.DEVICE_ADMIN_PACKAGE_NAME com.example.nonexistent
Change-Id: I1e3cf406e8053f6dbf99669f33b7c16648c9c8f8
Fix: 70491813

6 years agoMerge "Fix assertion in VisibilityPreferenceControllerTest."
TreeHugger Robot [Mon, 11 Dec 2017 19:19:33 +0000 (19:19 +0000)]
Merge "Fix assertion in VisibilityPreferenceControllerTest."

6 years agoUpdate package name for PictureAndPictureSettings
Doris Ling [Mon, 11 Dec 2017 19:18:10 +0000 (11:18 -0800)]
Update package name for PictureAndPictureSettings

- the settings have been moved into the appinfo package, but the path
has not been updated properly in the android manifest.

Change-Id: I3a00a187bd2fdbeb926e2bb8cc1c4ab720ccd72a
Fixes: 70491786
Test: manual

6 years agoAdd icons for color inversion and daltonizer
Phil Weaver [Sat, 9 Dec 2017 01:10:06 +0000 (17:10 -0800)]
Add icons for color inversion and daltonizer

For accessibilty settings, both on the main page
and the shortcut picker.

Also now observing settings that could be toggled
by the shortcut, so changes can be reflected immediately
in the settings ui.

Bug: 34621067
Fixes: 70335904
Test: Observe icons in settings and shortcut picker.
Toggling color inversion and color correction now changes
the setting ui immediately.

Change-Id: Id27b6471376059288ff971e5aea72d76078bef36

6 years agoDelete about phone v1 code
jeffreyhuang [Thu, 30 Nov 2017 00:41:48 +0000 (16:41 -0800)]
Delete about phone v1 code

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: Ib8f420a86caa1da0165aa5c161eb584a009ed2b9

6 years agoMerge "Fix VisibilityPreferenceControllerTest."
TreeHugger Robot [Mon, 11 Dec 2017 18:45:33 +0000 (18:45 +0000)]
Merge "Fix VisibilityPreferenceControllerTest."

6 years agoMerge "Remove Slice getter from BasePreferenceController"
TreeHugger Robot [Mon, 11 Dec 2017 17:40:05 +0000 (17:40 +0000)]
Merge "Remove Slice getter from BasePreferenceController"

6 years agoFix assertion in VisibilityPreferenceControllerTest.
Tobias Thierer [Mon, 11 Dec 2017 17:36:39 +0000 (17:36 +0000)]
Fix assertion in VisibilityPreferenceControllerTest.

The test was asserting that VISIBILIY_NO_OVERRIDE (an int)
is not contained in a List<String> (*), which is (trivially)
true but doesn't test what the test intends to test.

(*) or a List<CharSequence>, which is similarly wrong /
  meaningless, prior to the base CL http://ag/3345932

VisibilityPreferenceController uses Integer.toString() to
construct corresponding String values, so the test should
be checking for that String value. For consistency with
  testUpdateState_noGlobalRestriction()
this CL uses the equivalent (and slightly shorter)
String.valueOf(int) instead of Integer.toString().

Test: EXPERIMENTAL_USE_OPENJDK9=1.8 make RunSettingsRoboTests \
   ROBOTEST_FILTER=VisibilityPreferenceControllerTest

Change-Id: I48644729d3e0f29d7ffcc981aeef650f2b1426ef

6 years agoMerge "Clearing task when opening home settings in case it is already in the same...
Sunny Goyal [Mon, 11 Dec 2017 17:36:31 +0000 (17:36 +0000)]
Merge "Clearing task when opening home settings in case it is already in the same task"

6 years agoFix VisibilityPreferenceControllerTest.
Tobias Thierer [Mon, 11 Dec 2017 16:51:07 +0000 (16:51 +0000)]
Fix VisibilityPreferenceControllerTest.

The test was expecting an ArgumentCaptor for RestrictedDropDownPreference
(extends ListPreference).setEntryValues(CharSequence[]) to be passed an
array of Strings, when actually it should have expected an array of
CharSequences.

This CL fixes the test to use CharSequence. Since CharSequence.equals()
is not guaranteed to be in terms of value equality of the characters,
a private static helper method:

  List<String> toStringList(CharSequence[] charSequences) { ... }

is used.

Bug: 70504129
Test: EXPERIMENTAL_USE_OPENJDK9=1.8 make -j30 showcommands dist \
  RunSettingsRoboTests RunSettingsRoboTests-jacoco \
  RunSettingsLibRoboTests RunSettingsLibRoboTests-jacoco \
  RunSettingsGoogleRoboTests RunSettingsGoogleRoboTests-jacoco \
  RunSuwRoboTests RunSuwRoboTests-jacoco \
  RunTurboRoboTests \
  RunStorageManagerRoboTests \
  RunTvSettingsRoboTests RunTvSettingsRoboTests-jacoco

Change-Id: I347b03e6cb01715cd1c7f50b5f36567e5f375ad7

6 years agoDisable crashing ExternalSourcesSettingsTest#testManageExternalSourcesForApp
Aurimas Liutikas [Sat, 9 Dec 2017 19:01:16 +0000 (19:01 +0000)]
Disable crashing  ExternalSourcesSettingsTest#testManageExternalSourcesForApp

Bug: 70383636
Change-Id: If542ef48d54959b3cc6c9fb07ddf07977fe40a8b

6 years agoMerge "Stop statically including legacy-android-test"
Paul Duffin [Sat, 9 Dec 2017 11:18:13 +0000 (11:18 +0000)]
Merge "Stop statically including legacy-android-test"

6 years agoClearing task when opening home settings in case it is already in the same task
Sunny Goyal [Fri, 8 Dec 2017 17:35:03 +0000 (09:35 -0800)]
Clearing task when opening home settings in case it is already in the same task

Test: Manually tested on device
Bug: 69960568
Change-Id: If9de28936a7156c4d9c68c85c168ff4aa7492151

6 years agoStop statically including legacy-android-test
Paul Duffin [Fri, 8 Dec 2017 00:02:43 +0000 (00:02 +0000)]
Stop statically including legacy-android-test

Statically including legacy-android-test leads to duplicate classes
which causes build time problems (with Proguard) and runtime problems on
older SDK versions. This change:
* Stops statically including legacy-android-test.
* Adds compile time dependencies on andoid.test.base, android.test.mock
  and android.test.runner where necessary.
* Adds <uses-library android:name="android.test.runner"/> to any
  affected package to ensure that the classes that were included by
  legacy-android-test are still available at runtime. That also adds a
  dependency on android.test.base and android.test.mock.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* tests/unit/Android.mk
    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because SettingsUnitTests's source depends on
    their classes and because of these changes they are no longer
    present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SettingsUnitTests
    results in duplicate classes which leads to build time and compile
    time issues.

Bug: 30188076
Test: make checkbuild
Change-Id: I191a72e50017213df6ad04f32aa660e8028720e2

6 years agoAdd ConnectedUsbDeviceUpdater
jackqdyulei [Fri, 1 Dec 2017 18:36:22 +0000 (10:36 -0800)]
Add ConnectedUsbDeviceUpdater

The usb updater listens to usb update and notify
ConnectedDeviceGroupController to add/remove
preference.

This cl:
1. Add ConntectedusbDeviceUpdater
2. Extract the UsbConnectionBroadcastReceiver since it would be
used both in controller and updater.
3. Add tests

Bug: 69333961
Test: RunSettingsRoboTests

Change-Id: Ic3b045a6faa4eba57d9b0c089ea1656141cc0220

6 years agoAdd feature flag to control battery app list.
jackqdyulei [Thu, 7 Dec 2017 23:41:48 +0000 (15:41 -0800)]
Add feature flag to control battery app list.

If feature flag is on, then display the app list. Otherwise disable
it.

Bug: 70234293
Test: RunSettingsRoboTests
Change-Id: I1663f925abf95e0e4c1a46d98ca165303a76e979

6 years agoMove AppListGroup to PreferenceController
jackqdyulei [Tue, 5 Dec 2017 21:03:29 +0000 (13:03 -0800)]
Move AppListGroup to PreferenceController

Move the app list in battery settings to PreferenceController. So that
we can:
1. Clean the code in PowerUsageSummary
2. Make it easy to add/move the app list to other place in furture.

This cl:
1. Move and make it invisible since in P we don't show app list in
battery main page.
2. Move related test to BatteryAppListPreferenceControllerTest

Bug: 70234293
Test: RunSettingsRoboTests
Change-Id: Ice7a42394916ff5e71305bfe22f5c35868d87fc7

6 years agoRemove Slice getter from BasePreferenceController
Matthew Fritze [Tue, 5 Dec 2017 19:13:10 +0000 (11:13 -0800)]
Remove Slice getter from BasePreferenceController

After working through a prototype here: (ag/3324435)
it is clear that we don't need the controller to
provider the slice. We will build an index that
will contain sufficent UI information, and a reference
to the controller.

At Slice Bind time, we can get the curret value from the
controller, and the UI information from the Index.

Bug: 67996923
Test: robotests
Change-Id: Id43a51bcd73051bc719cd5829907583e0edf23b2

6 years agoMerge "Import translations. DO NOT MERGE" into oc-mr1-dev am: 814fb3b7a1 -s ours
Bill Yi [Fri, 8 Dec 2017 06:04:47 +0000 (06:04 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-mr1-dev am: 814fb3b7a1  -s ours
am: 9840c89235  -s ours

Change-Id: If1f0055b82b51ae304b5bacafa95821d8eaa2d07

6 years agoMerge "Import translations. DO NOT MERGE" into oc-mr1-dev
Bill Yi [Fri, 8 Dec 2017 06:01:46 +0000 (06:01 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-mr1-dev
am: 814fb3b7a1  -s ours

Change-Id: Ic4696096352546cb962ab57470ed569535791665

6 years agoMerge "Import translations. DO NOT MERGE" into oc-mr1-dev
TreeHugger Robot [Fri, 8 Dec 2017 05:52:37 +0000 (05:52 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-mr1-dev

6 years agoMerge "Update feature flag dashboard UI to display all features"
TreeHugger Robot [Fri, 8 Dec 2017 05:50:54 +0000 (05:50 +0000)]
Merge "Update feature flag dashboard UI to display all features"

6 years agoImport translations. DO NOT MERGE am: 3ed385256a -s ours am: 14c47203b3 -s ours
Bill Yi [Fri, 8 Dec 2017 05:46:46 +0000 (05:46 +0000)]
Import translations. DO NOT MERGE am: 3ed385256a  -s ours am: 14c47203b3  -s ours
am: 5811075aeb  -s ours

Change-Id: I0ea16471b0fe4caa83f0b08907325e6771d19ac2

6 years agoImport translations. DO NOT MERGE am: 3ed385256a -s ours
Bill Yi [Fri, 8 Dec 2017 05:42:43 +0000 (05:42 +0000)]
Import translations. DO NOT MERGE am: 3ed385256a  -s ours
am: 14c47203b3  -s ours

Change-Id: Ic512ba80a6900175986841430f1b69e170bbd845