Commit Graph

3934 Commits

Author SHA1 Message Date
TreeHugger Robot
ec9606addb Merge "Fix layout height for suggestion tile." into pi-dev 2018-03-08 05:32:25 +00:00
jackqdyulei
c7a0c33ab5 Update fuelguage to use uid in AppInfo
The uid is needed to distinguish the same app used
by different users(even work profile user). So
we need to store the correct uid in AppInfo and
use it across the settings app.

Bug: 74022362
Test: RunSettingsRoboTests
Change-Id: Iaa0ea1ac1fbd3a3a1251e0cd1096d6a8c75c4ed8
2018-03-08 01:33:54 +00:00
Lei Yu
13eb2f18b4 Merge "Add whitelist for anomaly detection." into pi-dev 2018-03-08 01:14:51 +00:00
TreeHugger Robot
f3cfced1d1 Merge "For vibration settings page, create controllers from xml" into pi-dev 2018-03-08 01:07:38 +00:00
Doris Ling
8f5773b834 Fix layout height for suggestion tile.
- set minHeight instead of using a fix height, so that when the
font/display size is set to larger, the height will expand accordingly
to fit all elements in the suggestion card.

- revert the change that tint all suggestion icons. The previous logic
should be used to determine if we should tint the icon or not.

Change-Id: I2451490130cee216ff65301a600eb91d2e65c321
Fixes: 74261827
Test: visual and make RunSettingsRoboTests
2018-03-07 15:04:11 -08:00
Fan Zhang
36680b0934 For vibration settings page, create controllers from xml
This change leverages a new support in settings framework to
automatically share preference controllers between full setting page,
search, and slice provider.

Bug: 73668763
Test: existing robotest and atest
Change-Id: Ie96a28f1b503377b3fdf86e28d297c8560d8bf71
2018-03-07 14:48:26 -08:00
jackqdyulei
10051afb96 Add whitelist for anomaly detection.
Even though we can add whitelist in config, we still need to have a
on device whitelist to reduce the size of config.

Use doze whitelist here because we already used it to detect whether
we can restrict the app in battery detail page.

Bug: 74241534
Test: RunSettingsRoboTests
Change-Id: I35b6f3eba9fbc8ae51bb02cd9d5416e4360c388e
2018-03-07 13:20:36 -08:00
Salvador Martinez
db1efa3e03 Update BatteryInfo to include averageTimeToDischarge
This updates the Estimate data model class as well as the places
it is used to populate the new field when available.

Test: robotests
Bug: 74020365
Change-Id: Ibcecf933819f8b8cd8514205768569e9bd7d1517
(cherry picked from commit 453db0cdbc)
Merged-In: 453db0cdbc
2018-03-07 20:39:59 +00:00
Yueming Wang
fd7b78afb0 Merge "Block location accuracy when DISALLOW_CONFIG_LOCATION is set." into pi-dev 2018-03-07 20:10:10 +00:00
TreeHugger Robot
26b5b5b5db Merge "Add dump log for BatteryTip." into pi-dev 2018-03-07 18:53:09 +00:00
Victor Chang
999e4f4405 Merge "New time zone picker page" into pi-dev 2018-03-07 17:09:59 +00:00
TreeHugger Robot
ef6eb853f9 Merge "Update dabase manager to store the uid" into pi-dev 2018-03-07 16:57:35 +00:00
TreeHugger Robot
1e9268b52e Merge "System gets its own dnd toggle" into pi-dev 2018-03-07 16:39:40 +00:00
yuemingw
3bf4b9365e Block location accuracy when DISALLOW_CONFIG_LOCATION is set.
Bug: 72633181
Test: make ROBOTEST_FILTER=InjectedSettingTest -j40 RunSettingsRoboTests
Test: make ROBOTEST_FILTER=LocationServicePreferenceControllerTest -j40 RunSettingsRoboTests

Change-Id: I91e4dbff8bcce637424646f5435e72f9bb707631
2018-03-07 14:07:16 +00:00
Victor Chang
d5adf42c5e New time zone picker page
- Show current selected region and time zone in a 2 rows.
  Defailed info of current selected time zone in footer
- Show option menu to switch to select UTC offset
- This picker will be changed to the default picker in a later CL

Bug: 73952488
Test: m RunSettingsRoboTests
Change-Id: Ia81bb022e1021369612f5bd60c2c1f4d08db2af8
(cherry picked from commit b7d588f341)
2018-03-07 11:52:25 +00:00
jackqdyulei
36249c6254 Update dabase manager to store the uid
Also update the AppInfo to store the uid

Bug: 74022362
Test: RunSettingsRoboTests
Change-Id: I373242a12e9dbf48be134f2e9be30831b09f91c9
2018-03-07 04:20:13 +00:00
TreeHugger Robot
a276b8d580 Merge changes from topic "tip_new_page-pi-dev" into pi-dev
* changes:
  Hook up the new page to PowerUsageSummary
  Create new PowerUsageAdvanced page
  Change current PowerUsageAdvanced to legacy code
2018-03-07 03:40:50 +00:00
TreeHugger Robot
f178692bc5 Merge "Add auto restriction preference" into pi-dev 2018-03-07 02:32:17 +00:00
jackqdyulei
0ed66a4120 Add dump log for BatteryTip.
Since BatteryTipLoader will dump all BatteryTips, so we only need
to add toString() for it.

Bug: 74246970
Test: RunSettingsRoboTests
Change-Id: I0a89c4ac06d107274d47f8b4b66867373c062c1b
2018-03-06 18:21:16 -08:00
TreeHugger Robot
710207f024 Merge "Stop wrapping RoundedHomepageIcon if it's already wrapped." into pi-dev 2018-03-07 01:21:20 +00:00
jackqdyulei
094278e636 Hook up the new page to PowerUsageSummary
Add a menu to point to the new page

Bug: 73300636
Test: RunSettingsRoboTests
Change-Id: I9956e349cdbbe2cd752bdf65020a540a329bdee3
Merged-In: I9956e349cdbbe2cd752bdf65020a540a329bdee3
2018-03-06 17:20:06 -08:00
TreeHugger Robot
dce675c158 Merge "Add intent fields when launching instant app." into pi-dev 2018-03-07 00:59:20 +00:00
jackqdyulei
31a5960424 Create new PowerUsageAdvanced page
This page contains the graph at the top and app list at the bottom

In this cl, we reused some part of the code in PowerUsageAdvancedLegacy
to construct the graph, and also used controller to construct the app
list(So glad that we extracted it to controller before..)

Bug: 73300636
Test: RunSettingsRoboTests
Change-Id: I30afbc0327a5186f8280f5e3678330b363e2dc0d
Merged-In: I30afbc0327a5186f8280f5e3678330b363e2dc0d
2018-03-06 16:10:30 -08:00
jackqdyulei
d0086188d2 Change current PowerUsageAdvanced to legacy code
In future cl, we will create new PowerUsageAdvanced page.

Bug: 73300636
Test: Build
Change-Id: I608f6b1fb9bf29a6ef5d7f9d67bcb6eea9e7aec7
Merged-In: I608f6b1fb9bf29a6ef5d7f9d67bcb6eea9e7aec7
2018-03-06 15:27:20 -08:00
Fan Zhang
4fdf0b461d Stop wrapping RoundedHomepageIcon if it's already wrapped.
On homepage, if an icon is already wrapped in RoundedHomepageIcon, we
shouldn't wrap it more. Otherwise each time we do this it will add a few
dp padding around the bitmap.

Change-Id: I5313a38f4bd128272d7b4e05209aaee72c690c55
Fixes: 73295342
Test: robotest
2018-03-06 14:52:03 -08:00
TreeHugger Robot
83d9047ef4 Merge "Fix crash in battery info settings page." into pi-dev 2018-03-06 22:47:15 +00:00
Victor Chang
2e79a7cc42 Merge "Time zone, Region, UTC picker" into pi-dev 2018-03-06 22:01:35 +00:00
Doris Ling
c08984befd Add intent fields when launching instant app.
- add browseable category, package name, and new task flag.

Change-Id: Ie558f5885b5f0f78c88241de7c2d7a21cfb9d0fe
Fixes: 74131502
Test: make RunSettingsRoboTests
2018-03-06 13:37:21 -08:00
jackqdyulei
155c1785e1 Add auto restriction preference
1. Add method in feature provider to check whether smart battery
is supported
2. Hook up above method to controllers
3. Add auto restriction preference
4. Add tests

Bug: 73002171
Test: RunSettingsRoboTests
Change-Id: Ic314f61ad52e9bedb629b308731cb968bb4b1773
Merged-In: Ic314f61ad52e9bedb629b308731cb968bb4b1773
(cherry picked from commit ab0b0add0a)
2018-03-06 21:32:56 +00:00
TreeHugger Robot
5218829f68 Merge "Change encryption preference's summary accordingly" into pi-dev 2018-03-06 21:31:07 +00:00
Doris Ling
b76682afcb Merge "Create a new list when building suggestion data." into pi-dev 2018-03-06 21:09:24 +00:00
Doris Ling
b619e51baf Fix crash in battery info settings page.
- when receive package updates, check if the buttons preference is
available before trying to update the UI.

Change-Id: Ie3482b94c84cd55e9a138af4719a031f5167e089
Fixes: 74130214
Test: make RunSettingsRoboTests
2018-03-06 12:26:54 -08:00
Alex Cruz
d2a8b1ff02 Change encryption preference's summary accordingly
With this change a summary to the encryption preference was added.

415ce9a77d

The problem is that even if you're not encrypted, it says that your phone is.
Is very misleading to the user that don't bother to enter the actual preference
and want to see if they are. This fixes that.

This is cherry-picked from
https://android-review.googlesource.com/#/c/platform/packages/apps/Settings/+/517875/

Test: Go into Settings/Security & Location
Fixes: 68691666
Fixes: 68542516
Change-Id: Iaeaffd340f2e248748f244a947aa71eb8ad4ab94
2018-03-06 11:40:49 -08:00
Antoan Angelov
95d0b95948 Merge "Make "Action not allowed" dialog compliant with Material Spec and replace full screen activities with the dialog." into pi-dev 2018-03-06 19:37:52 +00:00
TreeHugger Robot
6a3bac39bf Merge "Fix SettingsRoboTests build error with OpenJDK 9" into pi-dev 2018-03-06 19:24:48 +00:00
Doris Ling
05811609c7 Create a new list when building suggestion data.
- using sublist of the original suggestions list may results in
ConcurrentModificationException if the originaly list is being modified.
Create a new list instead to avoid running into the issue.

Change-Id: Ia83a0432be542eeb428d177f6118d26fc2262e93
Fixes: 74194336
Test: run monkey
2018-03-06 10:55:40 -08:00
Fan Zhang
59520b028a Fix tests
Change-Id: I8b750a87e6852d60ac2f8f61a955b1296cef759b
Fixes: 74234076
Test: robotests
2018-03-06 09:09:31 -08:00
Beverly
c85496297a System gets its own dnd toggle
Test: make ROBOTEST_FILTER=ZenModeSystemPreferenceControllerTest RunSettingsRoboTests -j40
Bug: 73362490
Change-Id: Id5212665da8c820fc070676ff034dbe67510ea5d
2018-03-06 09:15:29 -05:00
Victor Chang
2b6876ccab Time zone, Region, UTC picker
- Extract most common view related codes into BaseTimeZoneAdapter
  and BaseTimeZonePicker. Subclass handles the text formatting and
  order.
- Search view is added compared to previous version of time
  zone picker
- SpannableUtil is added to preserve spannable when formatting
  String resource.
- Fix the bug using GMT+<arabic> as time zone id. b/73132985
- Fix Talkback treating flags on screens as a separate element

Bug: 72146259
Bug: 73132985
Bug: 73952488
Test: mm RunSettingsRoboTests
Change-Id: I42c6ac369199c09d11e7f5cc4707358fa4780fed
(cherry picked from commit fbd30acef0)
2018-03-06 11:13:59 +00:00
Fan Zhang
e8acc0c4bd Merge "Reuse xml parser logic to scrape preference xml files." into pi-dev 2018-03-06 00:24:40 +00:00
Fan Zhang
3b47e5bc9f Reuse xml parser logic to scrape preference xml files.
Bug: 73668763
Test: atest
Test: robotests
Change-Id: Ifc241b5b4ec6d2935c4c532ff902a7ba352a98d6
2018-03-05 14:20:19 -08:00
Fan Zhang
a00ed0aad6 Fix double help icon in wificalling screen
Change-Id: I36d4af83e1cb7fd77b360829baab2004422488c6
Fixes: 71538192
Test: robotests
2018-03-05 13:19:46 -08:00
arangelov
e35badd9d5 Make "Action not allowed" dialog compliant with Material Spec and replace full screen activities with the dialog.
Bug: 64893948
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogTest -j40 RunSettingsRoboTests
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest -j40 RunSettingsRoboTests
Change-Id: I9308d8d86a3789b8f2c92b9f4f20cf00cce71d14
2018-03-05 20:27:51 +00:00
Victor Chang
e10875210a Fix SettingsRoboTests build error with OpenJDK 9
- CL http://ag/3671365 broke git_pi-release/marlin-userdebug-jdk9
  when building "m checkbuild". It shouldn't break the image build

Test: m SettingsRoboTests
ROBOTEST_FILTER=com.android.settings.datetime.timezone
EXPERIMENTAL_USE_OPENJDK9=true USE_R8=true
Change-Id: I161c0350cff55bd13ba4a6c63df4e4e9bc4b1a5f
2018-03-05 20:26:38 +00:00
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
Victor Chang
229a6a2bc4 Merge "Time Zone data loader" 2018-03-03 15:39:51 +00:00
Xiangyu/Malcolm Chen
68628c2edd Merge "Disable "Mobile data" in "Data usage" if no SIM." 2018-03-03 02:42:51 +00:00
TreeHugger Robot
e4d7c0d2f7 Merge "Fix switch bar in location settings" 2018-03-03 00:37:45 +00:00
Malcolm Chen
0bedf3569e Disable "Mobile data" in "Data usage" if no SIM.
If SIM is taken out, we disable "Mobile data" button in "Data usage"
page.

Bug: 67408951
Test: manual
Change-Id: I9f8937eadd5494f4f7710b9d5431176a13324bdd
2018-03-02 16:00:33 -08:00
Maggie
601054ce6a Fix switch bar in location settings
When user rotates the device in location settings, the swtich bar with
"Use Location" is gone. This change fixes the problem.

Also, remove override getInitialExpandedChildCount() in
LocationSettings. We will use nested PreferenceCategory instead once the
support is ready.

Bug: 73872033
Bug: 70843646
Test: Manual
Change-Id: I343b549398ef2b3d64ca7962b5f2a4ef0441c7f5
2018-03-02 14:16:59 -08:00