Commit Graph

4785 Commits

Author SHA1 Message Date
Victor Chang
614de3b79a Merge "Fix not delivering result to fragment using SubSettingLauncher" 2018-02-28 10:59:36 +00:00
Fan Zhang
906572b127 Change PreferenceController#getSummary return type.
Return CharSequence instead of String.

All user visible string should be modeled as CharSequence.

Bug: 73950519
Test: robotest
Change-Id: I30befef0c33f94351d4a2774e283bd1ed804aa8b
2018-02-27 22:30:12 -08:00
TreeHugger Robot
26ea60a231 Merge "Fix search non-indexable update" 2018-02-28 02:09:21 +00:00
Salvador Martinez
52bd00fc29 Remove duplicate test
PowerUsageSummary was duplicated to have the old version exist
in developer options. This test is for a debug feature which will
not be released so there is no point in having a duplicate of it
as well. This CL removes that test.

Test: Is a test CL
Bug: 73513677
Change-Id: Ia3ed704018cfaa0b05c4bf0f2799ff8151ba4b85
2018-02-27 17:59:43 -08:00
TreeHugger Robot
45520fce49 Merge "Remove unused classes and tests." 2018-02-28 00:42:28 +00:00
Fan Zhang
f609cad6f0 Fix search non-indexable update
- When creating preference conotrollers, if one fail, skip that one
  instead of giving up entire operation.
- Fix BatterySaverController by providing a existing looper.

Change-Id: Iefe443b7fa91e51515c5c247fab4d9588867baef
Fixes: 73903739
Test: robotest
2018-02-27 16:15:56 -08:00
Lei Yu
4fc199b538 Merge "Fix the AnomalyCleanUpJobService" 2018-02-28 00:13:37 +00:00
TreeHugger Robot
77dbe4deb8 Merge "Add logging for battery tip" 2018-02-27 23:39:33 +00:00
Jerry Zhang
40bd570352 Remove unused classes and tests.
Old usb pages have been replaced by UsbDetailsFragment
and UsbDefaultFragment. Old connected devices has
been replaced by new connected devices.

Bug: 70848054
Test: Passes
Change-Id: I538cbb88d4f878449a83da9a4a0381e74e840c6a
2018-02-27 13:50:10 -08:00
jackqdyulei
0fa413e314 Fix the AnomalyCleanUpJobService
1. Invoke it in BOOT_COMPLETED
2. Set it periodic
3. Change the anomaly history from 3 days to 30 days

Bug: 72385333
Test: RunSettingsRoboTests
Change-Id: Ib59a85f3dffd6c094ff400a75bec44d4c65bce44
2018-02-27 10:19:33 -08:00
jackqdyulei
0e06b4e2a1 Add logging for battery tip
When it is triggered, we log the type of battery tip.

Bug: 3662211
Test: RunSettingsRoboTests
Change-Id: Iab1034008796b6b21eee53297b2e574199693f7e
2018-02-26 18:06:16 -08:00
Jan Nordqvist
e2385be5e1 Fixed failing launch of Data usage activty from data saver suggestion.
After introducing the new data usage UI behind a feature flag a bug was
introduced that causes the data saver suggestion to throw an exception
from a missing class reference in "legacy" mode.

Bug: 73648306
Test: manual
Change-Id: I4fcd2bd0f55931f40738266dca94a55fea5087b3
2018-02-26 17:10:45 -08:00
TreeHugger Robot
247641c4b5 Merge "Search highlight polish" 2018-02-27 00:28:07 +00:00
TreeHugger Robot
809db7a37c Merge "Fix PictureInPictureSettingsTest." 2018-02-27 00:08:16 +00:00
TreeHugger Robot
d89e9c2e24 Merge "Report High usage even in a short period" 2018-02-26 23:00:22 +00:00
Fan Zhang
730ea972d2 Search highlight polish
- Blink when starting highlight
- Extend highlight to 15 seconds
- Fade out when stopping highlight

Bug: 73313161
Test: visual
Change-Id: Ie6c3d640566f2eecc501d4c4f96df512171ff4b6
2018-02-26 14:48:13 -08:00
Tracy Zhou
220b6e2331 Fix PictureInPictureSettingsTest.
Bug: 73892555
Bug: 73892683
Test: m RunSettingsRoboTests
Change-Id: Id4145600240f12c2cc2f5aed978a1fe65fd1fd74
2018-02-26 14:45:13 -08:00
Andreas Gampe
c3bc3bc690 Merge changes I8dcc30b0,I85292ad2,Ie0ab3534 am: ffec1a0c68 am: 8d0a8ed985
am: 2658f2059c

Change-Id: Id4b3c85c9bf4bf7b76910e895b57d21e66c0e85f
2018-02-26 22:24:23 +00:00
Andreas Gampe
7d62a5e298 Merge changes I67dbf04a,I032f6741 am: 727ec42d8d am: 6b24cc5769
am: 257f42fd9d

Change-Id: I8bb1a61f255a1c80242ac264f061f15153df12aa
2018-02-26 22:16:49 +00:00
Andreas Gampe
2658f2059c Merge changes I8dcc30b0,I85292ad2,Ie0ab3534 am: ffec1a0c68
am: 8d0a8ed985

Change-Id: I0eb99bc2c2d1ec67c23ad020627a2cf43cfbb71d
2018-02-26 22:16:43 +00:00
Andreas Gampe
8d0a8ed985 Merge changes I8dcc30b0,I85292ad2,Ie0ab3534
am: ffec1a0c68

Change-Id: Ibac8d021d8d65fdab91f682b9fbfc0231a61a93f
2018-02-26 22:08:50 +00:00
Andreas Gampe
257f42fd9d Merge changes I67dbf04a,I032f6741 am: 727ec42d8d
am: 6b24cc5769

Change-Id: Ib649c224f4496785ae1eba0bce3a411eca8aa1bd
2018-02-26 22:08:42 +00:00
Andreas Gampe
6b24cc5769 Merge changes I67dbf04a,I032f6741
am: 727ec42d8d

Change-Id: I4c8ce0fa68ae3fbf2a3e835d165a766b6e6aad5c
2018-02-26 22:01:25 +00:00
Treehugger Robot
ffec1a0c68 Merge changes I8dcc30b0,I85292ad2,Ie0ab3534
* changes:
  Settings: Disable failing test
  Settings: Disable failing test
  Settings: Fix assertThat in tests
2018-02-26 22:00:19 +00:00
TreeHugger Robot
ca4fd1b7dc Merge changes I06df032d,Ib923de28
* changes:
  Settings: Disable failing tests.
  Settings: Fix assertThat in tests
2018-02-26 21:51:01 +00:00
xshu
3f04897a19 Adding Wifi setting to special_access settings
In the settings app, allow users to override app permission for
CHANGE_WIFI_STATE for every application that declared that permission.

Bug: 70562620
Test: compile, robotests

Manual test:
Flash build to device (walleye)
Download iPass from playstore
Open iPass and try connect to a wifi network; verify success
Open settings -> Apps & notifications -> Advanced -> Special app access
-> Wifi access
Select iPass from the list
Toggle the switch to off
Open iPass and try connect to a wifi network; verify failure

Change-Id: Ib2be4c83988a81ba7831d096c9b1980462e66903
2018-02-26 13:47:15 -08:00
Andreas Gampe
8f4716c401 Settings: Disable failing assert
Temporarily disable.

Bug: 73892004
Test: m RunSettingsRoboTests
Change-Id: I67dbf04ae59e54632155c3eda67c70335147fd19
2018-02-26 12:35:13 -08:00
Andreas Gampe
8123135388 Settings: Disable failing test
Disable temporarily.

Bug: 73892683
Test: m RunSettingsRoboTests
Change-Id: I8dcc30b0b090fef1f2fd8fa3c6de7bf69e8b97a9
2018-02-26 12:31:05 -08:00
Andreas Gampe
d20728e4ef Settings: Disable failing test
Disable temporarily.

Bug: 73892555
Test: m RunSettingsRoboTests
Change-Id: I85292ad20de2cb169825eccb19dff1eb82e6fbe1
2018-02-26 12:31:05 -08:00
Andreas Gampe
72eb284ae7 Settings: Fix assertThat in tests
Truth.assertThat is a fluent-style API. Fix the tests to actually
do something.

Found by errorprone.

Bug: 73513670
Test: m RunSettingsRoboTests
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Ie0ab35348fa56c73e6257477a50ff130450e74e7
2018-02-26 12:26:36 -08:00
Andreas Gampe
b506fb9b19 Settings: Disable failing tests.
Temporarily disable.

Bug: 73892008
Test: m RunSettingsRoboTests
Change-Id: I06df032d4a4de84c2f9f46e5086d97f688b0c989
2018-02-26 12:24:53 -08:00
Andreas Gampe
22bad556a1 Settings: Fix assertThat in tests
Truth.assertThat is a fluent-style API. Fix the tests to actually
do something.

Found by errorprone.

Bug: 73513670
Test: m RunSettingsRoboTests
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Ib923de28ce5dcf79b9dec718306877e31e58e024
2018-02-26 12:21:06 -08:00
Andreas Gampe
025ec2ba58 Settings: Fix assertThat in test
Truth.assertThat is a fluent-style API. Fix the tests to actually
do something.

Found by errorprone.

Bug: 73513670
Test: m RunSettingsRoboTests
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: I032f6741ac0c728781a9d22ab6158e7b74a30167
2018-02-26 12:13:00 -08:00
Zhizhi Liu
4b01eebe8b Merge "Move IconCache to SettingsLib(II)." 2018-02-26 19:22:04 +00:00
Victor Chang
61f7288166 Fix not delivering result to fragment using SubSettingLauncher
- Call Fragment.startActivityForResult instead of Activity's one

Test: make RunSettingsRoboTests
Test: App info page is closed instantly after uninstalling the package
Change-Id: If29c097c988101f89dcd9d0a5c1c68deed04eaa9
2018-02-26 15:41:52 +00:00
TreeHugger Robot
ce281e060d Merge "Fix bug causing the Overlay Settings page to be hidden behind overlays." 2018-02-26 13:38:47 +00:00
Peter Visontay
9aeaa197a9 Fix bug causing the Overlay Settings page to be hidden behind overlays.
Test: Manually using an app that displays a full-screen overlay.
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=DrawOverlayDetailsTest
Bug: 72734249

Change-Id: I84b61fea2a793bebfac025ca3a209286ceeef963
2018-02-26 12:04:57 +00:00
Fan Zhang
f7843adabd More renaming in DashboardFragment
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936

Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
2018-02-23 16:56:30 -08:00
Fan Zhang
aed8994f6f Rename Indexable::getAllPreferenceControllers.
To getPreferenceControllers. "all" is redundant. Then internally, the
old getPreferenceControllers() is renamed to
createPreferenceControllers() to emphasize the controllers are created
from code (versus the ones created from xml).

Bug: 73668763
Test: robotest
Change-Id: Ifec46aefdc2a418031c8e152028b30bdcd396fc7
2018-02-23 16:37:28 -08:00
TreeHugger Robot
8e6d5ad27e Merge "Instantiate pref controllers from xml if it's defined." 2018-02-24 00:13:45 +00:00
TreeHugger Robot
158096d25d Merge "Settings: Move DefaultAppInfo CandidateInfo to SettingsLib" 2018-02-23 23:31:47 +00:00
TreeHugger Robot
43a2ac6c7c Merge changes from topic "ww_5_auto_restrict"
* changes:
  Add special check for excessive bg anomaly
  Add auto restriction for excessive background
2018-02-23 22:56:48 +00:00
Fan Zhang
917f101899 Instantiate pref controllers from xml if it's defined.
- If a <preference> tag also defines a controller, we will try to
  instantiate it before displaying the UI. The same logic is shared by
  BaseSearchIndexProvider so it also drives search suppression.

- If user also defines a list of controllers programatically, the
  programatically created ones takes precedence.

Bug: 73668763
Test: WIP
Change-Id: I7aecec270bcd3af261e012ef1f6995d2a523cfa1
2018-02-23 14:08:51 -08:00
Dake Gu
fef14cac00 Settings: Move DefaultAppInfo CandidateInfo to SettingsLib
Bug: 3600711
Test: Moved DefaultAppInfoTest to SettingsLib
      m RunSettingsRoboTests
Change-Id: If9e2288009277f1940b9769790b78bb0a58b626a
2018-02-23 13:23:16 -08:00
TreeHugger Robot
7d8e770bcb Merge "Actually test for truth." 2018-02-23 20:53:16 +00:00
TreeHugger Robot
f783267a57 Merge "Fix reset button being disabled." 2018-02-23 20:51:28 +00:00
Maurice Lam
b93f6c171c Merge "Improve pattern layout for tiiiny screens" 2018-02-23 19:00:43 +00:00
Vishnu Nair
a206e58079 Merge "Simplify Window/Surface trace by using one QS Tile" 2018-02-23 18:25:04 +00:00
jackqdyulei
457fb842eb Add special check for excessive bg anomaly
To check whether this app has battery usage more than x%

Bug: 72385333
Test: RunSettingsRoboTests
Change-Id: I87e6b01c866a053658f84ce3486120ae82963fd9
2018-02-23 10:12:05 -08:00
jackqdyulei
3ee28c810d Add auto restriction for excessive background
If it is excessive bg anomaly and auto restriction is on, then
restrict the anomaly in receiver and store it in database.

Also in this cl we move the anomaly logic to a JobService, so all
works are done in a background thread and won't interfere the main
thread.

Bug: 72385333
Test: RunSettingsRoboTests &&
Will add auto restriction test once robo framework is updated(b/73172999)
Change-Id: Id0ec5fb449ce26bf19a292bcbe63838d621cfd8e
2018-02-23 10:11:34 -08:00