Commit Graph

4709 Commits

Author SHA1 Message Date
Victor Chang
3c5aeac39f Merge "Enable new time zone picker" into pi-dev 2018-03-07 17:09:59 +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
Victor Chang
7cf7fe4f9e Enable new time zone picker
- Change the UI test due to UI changes

Bug: 73952488
Test: m RunSettingsRoboTest
Test: atest SettingsUITests:ZonePickerSettingsTest
Change-Id: I6d5716347e9debf429b757f1edd4118e86b70fab
(cherry picked from commit 335c0621d2)
2018-03-07 13:37:00 +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
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
Phil Weaver
203b923cb4 Settings reflect new a11y shortcut on lockscreen
Matching changes to the framework behavior. The
setting is on by default iff the user has agreed
to use the a11y shortcut.

Bug: 70944865
Test: Adding new test for this fragment that checks
this behavior

Change-Id: I7831f64cf3ec59c2d266340cc570227433a4febb
2018-03-03 03:35:24 +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
TreeHugger Robot
8a6c737cb7 Merge "Fix non-unique keys for location settings" 2018-03-02 20:19:36 +00:00
Victor Chang
6c33caad4b Time Zone data loader
- Use CountryZonesFinder to provide time zone id and region-to-timezone
  mapping, where the underlying data is updatable through an unbundled time zone
  data app in some devices.

Bug: 73952488
Bug: 72144448
Test: m RunSettingsRoboTests
Change-Id: I2e01e167c48987ebb98d4881a1a528d16dd82944
2018-03-02 19:24:48 +00:00
Maggie
81fa5ace46 Fix non-unique keys for location settings
Bug: 74104689
Test: Robo
Change-Id: I54ead73b69a6c62897d6b99e14fa5b6627163052
2018-03-02 10:39:08 -08:00
Antony Sargent
6bfcba78f4 Merge "Move force stop button back out of options menu" 2018-03-02 17:21:06 +00:00
TreeHugger Robot
3a7404ec69 Merge "Support Slice type in SliceData" 2018-03-02 00:48:08 +00:00
Antony Sargent
b513ca9303 Move force stop button back out of options menu
In ag/3485781 we moved the force stop button up into the options
menu, but it turns out we didn't actually want to do that. This
CL reverts that change.

Bug: 72948647
Test: make RunSettingsRoboTests
Change-Id: Id687dbde378dc9d95d88a9c188762094d05b6561
2018-03-01 16:06:42 -08:00
Doris Ling
92ffa4e4f0 Merge "Reduce max suggestion to show to 2." 2018-03-01 23:48:55 +00:00
TreeHugger Robot
c610324099 Merge "Remove unnecessary onDeveloperOptionsSwitchEnabled/Disabled override." 2018-03-01 23:35:45 +00:00
Matthew Fritze
1e9d9c7054 Support Slice type in SliceData
Add a getter for Slice type for BasePreferenceController.
This facilitates the generation of all possible Slices for Settings
search and discovery for AGSA.

Bug: 62807132
Test: robotests
Change-Id: I2cba1fc72c95769ecc26c76d1f2faa49a285d077
2018-03-01 15:25:14 -08:00