Commit Graph

4383 Commits

Author SHA1 Message Date
TreeHugger Robot
8468d1ad21 Merge changes from topic "battery_tip_constants"
* changes:
  Add BatteryTipDetector and LowBatteryTip stuffs.
  Add BatteryTipPolicy
2017-12-22 02:18:30 +00:00
Fan Zhang
6be8dfc9b7 DO NOT MERGE: Fix test failure in CodeInspectionTest
Change-Id: I74fbd30261fa66636c915936270d873e7612cbc6
Fixes: 70496869
Test: robotests
2017-12-21 15:42:41 -08:00
TreeHugger Robot
de70dcf282 Merge "Managed profile lock timeout" 2017-12-21 13:37:36 +00:00
TreeHugger Robot
79f4be2e5a Merge "Add toggle for enable/disable auto hotspot off" 2017-12-20 23:57:28 +00:00
Maggie Wang
8a05bef170 Merge "Display "Recent Location Requests" in order" 2017-12-20 22:31:43 +00:00
Maggie
3e9ab54f76 Display "Recent Location Requests" in order
A list of apps with recent location requests is displayed under Settings -> Security & Location -> Location. The apps were sorted in alphabetical order. This CL changes the behavior and displays the apps in original order from RecentLocationApps.getAppList().

Bug: 70350519
Test: Robolectric
Test: manual
Change-Id: I0fc1ce307b9519f3f324db220b6e2b32ed71cc2f
2017-12-20 14:21:22 -08:00
jackqdyulei
c1cc490f74 Add toggle for enable/disable auto hotspot off
Bug: 69323125
Test: RunSettingsRoboTests
Change-Id: I18896401240f75bdf2bdf187c2c7a7b623b20c43
2017-12-20 14:09:16 -08:00
Lei Yu
fe5c286cea Merge "Extract method getBatteryInfo() from loader" 2017-12-20 21:14:41 +00:00
Lei Yu
f1da75797e Merge "Remove wifi calling from Wifi settings" 2017-12-20 17:49:47 +00:00
Pavel Grafov
8e02f0e7e7 Managed profile lock timeout
Test: make ROBOTEST_FILTER=TimeoutPreferenceControllerTest RunSettingsRoboTests
Test: make ROBOTEST_FILTER=LockAfterTimeoutPreferenceControllerTest RunSettingsRoboTests
Bug: 63908311
Change-Id: I7236ec4ca37353703145c3e75d508101ecc6ca80
2017-12-20 17:34:28 +00:00
TreeHugger Robot
3abedefd38 Merge "Add ability to show/hide default_home preference." 2017-12-20 07:47:08 +00:00
TreeHugger Robot
1b1602ab2d Merge "Index Data to build Slices in Settings" 2017-12-20 01:00:32 +00:00
jackqdyulei
5f0b09648b Add BatteryTipDetector and LowBatteryTip stuffs.
This cl adds the infra of BatteryTipDetector and use LowBatteryTip
as an example(tip model + detector).

Also add SummaryTipDetector and related tests

Bug: 70570352
Test: RunSettingsRoboTests

Change-Id: Icf1349b6ede9eb7ee5ed69b39ee3a2661ac660fa
2017-12-19 16:49:08 -08:00
jackqdyulei
03a5612355 Add BatteryTipPolicy
BatteryTipPolicy contains all experimental values we could tune for
battery tip.

Bug: 70570352
Test: RunSettingsRoboTests

Change-Id: I26a3c2260dc6ff5cb10e3a4c1d55a715cc5c9a9d
2017-12-19 16:48:12 -08:00
jackqdyulei
0c6d7e744a Extract method getBatteryInfo() from loader
In battery tips, we need synchronized method to get batteryInfo.
This cl move the logic to BatteryUtils, then in battery tips we
could use this method directly.

Bug: 70570352
Test: robotest still pass
Change-Id: Id69349a25395ae472a9b3152c6f04127ee32c4e1
2017-12-19 16:30:56 -08:00
Ben Lin
b60d2cbb5b Add ability to show/hide default_home preference.
This adds a new boolean flag, config_show_default_home, which when set
to false will hide the default_home preference item.

Bug: 62378256
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=DefaultHomePreferenceControllerTest

Change-Id: Ibbf17ebb76b61fc8b2eac84016e3d874ca15a513
2017-12-19 15:57:29 -08:00
Lei Yu
ae85618dd7 Merge "Add infra for battery tip" 2017-12-19 23:42:28 +00:00
TreeHugger Robot
4d577ee113 Merge "Unit test for screen timeout policy handling in Settings" 2017-12-19 22:43:41 +00:00
jackqdyulei
fde63fc351 Add infra for battery tip
This cl adds the basic structure for battery tip:
1. BaseBatteryTip: Model class to represent the tip and build
preference and dialog
2. SummaryTip: Display a general battery summary(i.e. your battery
is good..)
3. BatteryTipLoader: AsyncLoader to load the battery tips.
4. BatteryTipPreferenceController: preference controller for
preference group to display battery tips

This cl also:
1. Remove the anomaly code in PowerUsageSummary and we will add it
to app restriction in future.
2. Add preference_category_no_title.xml to avoid the extra 32dp
blank at the top.

Bug: 70570352
Test: RunSettingsRoboTests
Change-Id: If91a553888e2eb91d55fb1d0d7bbea69652f144c
2017-12-19 13:27:33 -08:00
TreeHugger Robot
a9a7dda4a5 Merge "Import translations. DO NOT MERGE" 2017-12-19 21:06:04 +00:00
Pavel Grafov
d50a536d1d Unit test for screen timeout policy handling in Settings
This is a follow-up for http://ag/3123412

Test: make ROBOTEST_FILTER=LockAfterTimeoutPreferenceControllerTest RunSettingsRoboTests
Test: make ROBOTEST_FILTER=TimeoutPreferenceControllerTest RunSettingsRoboTests

Bug: 63908311
Change-Id: I27631743d52163f3b6d1589b427ba617e74725a9
2017-12-19 21:05:16 +00:00
Fan Zhang
74a91ca49e Merge "Fix UniquePreferenceTest" 2017-12-19 20:22:18 +00:00
Bill Yi
b504e3c1dc Import translations. DO NOT MERGE
Change-Id: I7bbec8bd3d4424dfaeefc0770d3057993963ba86
Auto-generated-cl: translation import
2017-12-19 11:37:10 -08:00
Fan Zhang
c007634df2 Fix UniquePreferenceTest
Bug: 70638967
Test: atest UniquePreferenceTest
Change-Id: Idf06ccd9580d66c051f9b7c910c567f321da6cc5
2017-12-19 10:52:30 -08:00
jackqdyulei
4cd0b14e02 Remove wifi calling from Wifi settings
Also remove the preference controller since it is only used in
ConfigureWifiSettings. The mobile network page lives in
com.android.phone and it has its own way to handle the wifi calling.

Bug: 70798448
Test: RunSettingsRoboTests
Change-Id: I0ea923c0a1ba2b89fcf8939d70128e3f54c75558
2017-12-19 10:17:45 -08:00
Andrew Scull
da167c3d0f Merge "Check password blacklist when setting credential" 2017-12-19 18:01:55 +00:00
Matthew Fritze
13c43f1900 Index Data to build Slices in Settings
The indexing is done by taking the indexable fragments from
search, grabbing their XML via SearchIndexableResources, and
then looking for controllers defined in preferences.

For each controller found, we take the combination of the
fragment providing the XML and the Preference info to create
an indexable row.

Buiding a Slice will be handled in a subsquent CL, but a
prototype can be found here: ag/3324435

Test: robotests
Bug: 67996923
Change-Id: I48668618079bcc3da55ab77b7323ee8e467073af
2017-12-19 09:47:07 -08:00
TreeHugger Robot
92a1a0f22f Merge "Revert "Moving settings tests into the settings package"" 2017-12-19 07:50:03 +00:00
Ashita Sriraman
76e569d3a6 Revert "Moving settings tests into the settings package"
This reverts commit 54fa3c5e41.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Id90d8718b4b0db3f3831fb2dc82cae6aea6c9170
2017-12-19 06:25:54 +00:00
Ashita Sriraman
66d9ee93de Merge "Moving settings tests into the settings package Test: Built successfully Change-Id: I53d8a5cdd4bce6049707c09a284ebc145efeddc1" 2017-12-19 00:42:35 +00:00
rongrong.x.gao
92a08de636 Merge "Launch new Home app when selecting Home app in Settings" am: f05fc290b7 am: b0ab6da4e3
am: fbc9e954d7

Change-Id: Ifffdd0e1d6f3df829d9e4cc9710876d415a33420
2017-12-18 22:27:30 +00:00
rongrong.x.gao
fbc9e954d7 Merge "Launch new Home app when selecting Home app in Settings" am: f05fc290b7
am: b0ab6da4e3

Change-Id: I741b464e9903c13d68a3025d6cfbb057159ee950
2017-12-18 22:19:28 +00:00
Treehugger Robot
f05fc290b7 Merge "Launch new Home app when selecting Home app in Settings" 2017-12-18 22:09:25 +00:00
TreeHugger Robot
7393cd1cf1 Merge "Introduce config_show_wallpaper_attribution." 2017-12-18 20:46:59 +00:00
TreeHugger Robot
6d8b89a739 Merge "Add preference controller for app header view." 2017-12-18 20:46:53 +00:00
Ashita Sriraman
54fa3c5e41 Moving settings tests into the settings package
Test: Built successfully
Change-Id: I53d8a5cdd4bce6049707c09a284ebc145efeddc1
2017-12-18 11:59:43 -08:00
Tony Mantler
35d37784d0 Merge "Move PowerWhitelistBackend to SettingsLib" 2017-12-18 19:45:53 +00:00
Alexandru-Andrei Rotaru
aeb3e4473b Check password blacklist when setting credential
If the password is valid by all other checks, see if it is present on
the blacklist and disallow it if it is.

Test: set a password blacklist, try and set a blacklisted password and
see an explanation, set a non-blacklisted password successfully.
Test: make ROBOTEST_FILTER=ChooseLockPasswordTest RunSettingsRoboTests

Bug: 63578054
Fix: 65659151
Change-Id: Id155b824ad4b5839c23b6f5fd3fdfdcfc78c3df1
2017-12-18 13:34:21 +00:00
rongrong.x.gao
b573e23b48 Launch new Home app when selecting Home app in Settings
Launches the newly selected Home app when it has been selected in
Default Home app settings. This CL makes the change take effect
immediately, instead of when the Home button is pressed.

Bug: 70697830
Test: make RunSettingsRoboTests
Test: Manual - Change default home app in Settings
Change-Id: If7e2956bc6f8ddba0a7e8da48a0d38e3936c57e9
2017-12-16 12:44:01 +09:00
Janis Danisevskis
7bc0236cc7 Merge "Make Settings aware of legacy user keys with secret key prefix" 2017-12-15 23:48:55 +00:00
Janis Danisevskis
b705e1a691 Make Settings aware of legacy user keys with secret key prefix
Secret keys are not longer identifiable by their alias prefix.
So now we call getKeyCharacteristics and check the algorithm of the
key.

Bug: 63931634
Test: Manually installed a key and checked that it is still dispayed
      correctly.
Change-Id: I55a4e46434618cb52ceb9456f184e004165872fd
2017-12-15 13:46:27 -08:00
Tony Mantler
bf25160090 Move PowerWhitelistBackend to SettingsLib
Bug: 70716754
Test: RunSettingsRoboTests
Change-Id: I897ce3469bb2d72a0cbe96b16b8de1a565ba4e64
2017-12-15 12:58:34 -08:00
jackqdyulei
5ef1f502f0 Turn on the new connected device page by default
Bug: 69926683
Test: RunSettingsRoboTests
Change-Id: Ice589b825226e92eace5f5fa6b58499a13e36ef8
2017-12-15 11:08:24 -08:00
Pavel Grafov
444989ad35 Merge "Respect DISALLOW_UNIFIED_PASSWORD in Settings." 2017-12-15 13:47:48 +00:00
Philip P. Moltmann
e360d51476 Merge "Switch to modern ArgumentMatchers" am: b8bf3bbc72
am: ced2263d48

Change-Id: Iccb726dc2166bb1e30f39f7f6539fb74e1d83997
2017-12-15 11:04:48 +00:00
Ben Lin
e4ca92af6b Introduce config_show_wallpaper_attribution.
This introduces a boolean flag in which when set to true, Wallpaper
Attribution will be shown in the Legal page. When set to false, it
will be hidden. Wallpaper has always been removed from search results,
so that has not changed.

Bug: 62378616
Test: make RunSettingsRoboTests ROBOTEST_FILTER=LegalSettings passes.
Change-Id: Ia6f3e7d1ef471eecf79f1b46616fa4ba27d35748
2017-12-14 14:38:30 -08:00
Doris Ling
e712aed3d7 Add preference controller for app header view.
- move code related to initializing/refreshing the app header from
AppInfoDashboardFragment into a new controller.
- this is the last preference logic in AppInfoDashboardFragment. With
this change, the conversion into dashboad fragment will be considered
as complete.
- remaining work for the bug will be enable the feature flag and remove
the obsolete InstalledAppDetails.

Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: I14056bf291278b2b36f9502177c84edd6a899d0f
2017-12-14 14:23:41 -08:00
TreeHugger Robot
91ffc73152 Merge "Hide Location Mode from search results if it's not available." 2017-12-14 18:08:44 +00:00
Philip P. Moltmann
a56f6c5bdb 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-14 09:48:33 -08:00
TreeHugger Robot
c87e5a3609 Merge "Add developer option control for GNSS duty cycling." 2017-12-14 15:49:17 +00:00