Commit Graph

3226 Commits

Author SHA1 Message Date
Matthew Fritze
5c6af383af Fix DataUsageSummary non-indexable keys
Indexing in DataUsage was not conventional, since it
blocked adding XML based on current sim status rather than
indexing everything and changing non-indexabe keys.

Change-Id: I2097a3ac4ffd714b60299c07b29c81f246e414eb
Merged-In: I7bb3cdb0f11772bbaefb6c21c61eb63bd0b17c7e
Fixes: 64193449
Test: robotests
2017-07-31 21:18:54 +00:00
Tony Mantler
3d84d56336 Remove development settings prefs file
Move DevelopmentSettingsEnabler to SettingsLib

Bug: 64159590
Test: DevelopmentSettingsEnablerTest
Change-Id: Id609266019e05a3e06b4ee3bc10de9c019628a42
2017-07-31 14:01:09 -07:00
Sundeep Ghuman
45bb3a1a77 onConnectedChanged should not update access points
In WifiSettings, invocation of onConnectedChanged should not update
access points. This is controller by another callback,
onAccessPointsChanged. Furthermore, this is fired before any changes
have even been made to the AccessPoints.

This is exacerbating a problem where old scan results are not shown in
the WifiPicker, or sometimes the platform does not return any scan
results.

Bug: b/38212080
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: Ibbc067d9952525b4edd85389996509e9b17bb1bd
2017-07-31 13:23:02 -07:00
Alex Kulesza
b509f87040 Merge "Fixing bug in UsageGraph rendering." into oc-dr1-dev am: 8fd9c28b7e am: b76fe783e0
am: 5252372c15

Change-Id: I9ec7bf6f03d0c08b77db145abdbc1557beaa30aa
2017-07-31 20:22:49 +00:00
Fan Zhang
543d7f1414 Merge "Merge "Remove DND and all gesture suggestions from Settings" into oc-dr1-dev am: 9064072ed7 am: 1b62cfb973" into oc-mr1-dev-plus-aosp
am: 6d591a3682

Change-Id: Ib7739df2540340e6ef7eea921f8833572864196d
2017-07-31 20:22:05 +00:00
jackqdyulei
7620f6555a Merge "Merge "Create wrapper and shadow for AccessibilityManager" into oc-dr1-dev am: d6c9a8b5b2 am: 68af5f3a5d" into oc-mr1-dev-plus-aosp
am: d8664d6cba

Change-Id: I73affa5a3fb146ac4ddc62a96b16b54a4554b224
2017-07-31 20:20:47 +00:00
jackqdyulei
2955995268 Merge "Use package from sipper if default is null" into oc-mr1-dev am: 8be9d6519f
am: 6399937d47

Change-Id: I54392bce57eb20c96e51ee5270cc19d4b8d2b933
2017-07-31 20:20:20 +00:00
Alex Kulesza
5252372c15 Merge "Fixing bug in UsageGraph rendering." into oc-dr1-dev am: 8fd9c28b7e
am: b76fe783e0

Change-Id: I1f56ef0bd997293c0f1912abc2c5fc193c060684
2017-07-31 19:33:55 +00:00
jackqdyulei
1f0f6317f6 Use package from sipper if default is null
The BatteryEntry need a background thread to update the
package name and icon. However in InstalledAppDetails we
don't have this thread and it is unnecessary because we
already has the package name.

This cl:
1. Use the mPackageName from InstalledAppDetails directly in
BatteryEntry
2. Double check the defaultPackageName in AdvancedPowerUsageDetail,
use packageName from sipper if default is null

Bug: 64127162
Test: RunSettingsRoboTests

Change-Id: I5d21afca17f177817976758c28ed86b3a10e95eb
Merged-In: I5d21afca17f177817976758c28ed86b3a10e95eb
2017-07-31 12:33:10 -07:00
Alex Kulesza
e9216ccbd3 Merge "Fixing bug in UsageGraph rendering." into oc-dr1-dev
am: 8fd9c28b7e

Change-Id: I47a18bcfc174e06964aaa3a7140ebcf5be12919c
2017-07-31 19:30:16 +00:00
Alex Kulesza
b76fe783e0 Merge "Fixing bug in UsageGraph rendering." into oc-dr1-dev
am: 8fd9c28b7e

Change-Id: I8a24c0d388524c34d19a2f1bfd0e8f53b6c9304c
2017-07-31 19:30:16 +00:00
Android Build Merger (Role)
6d591a3682 Merge "Merge "Remove DND and all gesture suggestions from Settings" into oc-dr1-dev am: 9064072ed7 am: 1b62cfb973" into oc-mr1-dev-plus-aosp 2017-07-31 19:28:45 +00:00
Fan Zhang
b43867dc5e Merge "Remove DND and all gesture suggestions from Settings" into oc-dr1-dev am: 9064072ed7
am: 1b62cfb973

Change-Id: I2911fd45b056eb9ecf8f523a824878cf23747b8d
2017-07-31 19:28:28 +00:00
Android Build Merger (Role)
d8664d6cba Merge "Merge "Create wrapper and shadow for AccessibilityManager" into oc-dr1-dev am: d6c9a8b5b2 am: 68af5f3a5d" into oc-mr1-dev-plus-aosp 2017-07-31 19:28:21 +00:00
jackqdyulei
7bea7b2cdd Merge "Create wrapper and shadow for AccessibilityManager" into oc-dr1-dev am: d6c9a8b5b2
am: 68af5f3a5d

Change-Id: I24a1e496688277428b680eaa0a66dd12e0eac3d3
2017-07-31 19:27:46 +00:00
TreeHugger Robot
8fd9c28b7e Merge "Fixing bug in UsageGraph rendering." into oc-dr1-dev 2017-07-31 19:19:03 +00:00
Fan Zhang
1b62cfb973 Merge "Remove DND and all gesture suggestions from Settings" into oc-dr1-dev
am: 9064072ed7

Change-Id: Ic4bb153fc670441f3f1a04be40e56d59d31f4275
2017-07-31 19:12:11 +00:00
jackqdyulei
68af5f3a5d Merge "Create wrapper and shadow for AccessibilityManager" into oc-dr1-dev
am: d6c9a8b5b2

Change-Id: I9dcac73b1360471f4357ef75201b49c6d5031033
2017-07-31 19:11:31 +00:00
Fan Zhang
56538f1775 Merge "Remove DND and all gesture suggestions from Settings" into oc-dr1-dev
am: 9064072ed7

Change-Id: I8aec2dc4de1ec18375ce3af177f1c9769499f8e3
2017-07-31 19:09:10 +00:00
jackqdyulei
b3a488c40c Merge "Create wrapper and shadow for AccessibilityManager" into oc-dr1-dev
am: d6c9a8b5b2

Change-Id: Id708356c38b10789974e35193c1d71dc0c9fdf34
2017-07-31 19:08:31 +00:00
TreeHugger Robot
8be9d6519f Merge "Use package from sipper if default is null" into oc-mr1-dev 2017-07-31 18:58:22 +00:00
TreeHugger Robot
9064072ed7 Merge "Remove DND and all gesture suggestions from Settings" into oc-dr1-dev 2017-07-31 18:56:02 +00:00
TreeHugger Robot
d6c9a8b5b2 Merge "Create wrapper and shadow for AccessibilityManager" into oc-dr1-dev 2017-07-31 18:55:40 +00:00
Geoffrey Pitsch
f3fc635947 AOD setting availability depends on other user settings
Bug: 62918778
Test: make
ROBOTEST_FILTER=AmbientDisplayAlwaysOnPreferenceControllerTest
RunSettingsRoboTests -j
Change-Id: Id6f1ad580cf5caace82a1bfa85e85b98f134f9d6
2017-07-31 13:56:41 -04:00
Alex Kulesza
4a121ecfae Fixing bug in UsageGraph rendering.
The calculateLocalPaths() method of UsageGraph converts a set of paths
in (milliseconds, percent) coordinates into the actual pixel values that
will be used for drawing. For the most part this is a one to one
process, but not always: input points that are too closely spaced to
draw accurately are skipped. The last point in the path, however, is
never skipped, in order to ensure that the graph ends at the correct
location.

The previous implementation of this method had a bug: the y-coordinates
of points that were skipped would be stored indefinitely (in the local
variable pendingYLoc) and then added back at the very end of the path
(under the condition i == mPaths.size() - 1 && pendingYLoc !=
PATH_DELIM). Under the right conditions, this led to the strange uptick
at the end of the graph seen in the associated bug.

This CL fixes the problem and attempts to make the logic slightly
clearer. It also adds tests, one of which (_similarPointMiddle) fails
for the previous code.

In more detail, previously pendingXLoc was used to hold the last x
coordinate seen, while pendingYLoc was used to hold the last *skipped* y
coordinate, or PATH_DELIM otherwise. The difference between these was
somewhat subtle and hard to understand from a quick read of the code,
and there was a bug: pendingYLoc never got reset to PATH_DELIM even if
later points were added. In this CL I have removed the pendingLoc
variables in favor of a single lx/ly pair, which always holds the local
coordinates of the most recent point, and I added an explicit boolean
skippedLastPoint to track whether the point (lx, ly) has already been
added or was skipped.

Bug: 64065296
Test: make RunSettingsRoboTests
Change-Id: I45ccffea1280d851bfae5143c2e84d188e133731
2017-07-31 11:12:17 -04:00
jackqdyulei
d6cb4a1738 Add shadow and wrapper classes
These classes are used for accessibility service. Also
add a new Availablity type.

Bug: 62022517
Test: Build
Change-Id: Ia2ff72dd04fd99b17809822907746c2411cecb62
2017-07-28 16:12:47 -07:00
Fan Zhang
4f04c68dd1 Remove DND and all gesture suggestions from Settings
Change-Id: I2f59c426132ca907e556b8bb2fbc869f4e830768
Fix: 64156274
Test: robotests
2017-07-28 14:39:48 -07:00
jackqdyulei
51872ed345 Use package from sipper if default is null
The BatteryEntry need a background thread to update the
package name and icon. However in InstalledAppDetails we
don't have this thread and it is unnecessary because we
already has the package name.

This cl:
1. Use the mPackageName from InstalledAppDetails directly in
BatteryEntry
2. Double check the defaultPackageName in AdvancedPowerUsageDetail,
use packageName from sipper if default is null

This cl is cherry picked from oc-dr to fix the test breakage.

Bug: 64127162
Test: RunSettingsRoboTests

Change-Id: I5d21afca17f177817976758c28ed86b3a10e95eb
2017-07-28 14:16:38 -07:00
Lei Yu
3e9e4d5bcd Merge "Turn off some anomaly detectors by default" into oc-dr1-dev am: f940431d32 am: 90db9083ad
am: 5711389270

Change-Id: Ifafa37160dddc8799fcbca61715df18f952e7ef5
2017-07-28 20:57:18 +00:00
Lei Yu
7cfaeeca58 Merge "Turn off some anomaly detectors by default" into oc-dr1-dev
am: f940431d32

Change-Id: I2e7ab9e29e9e2910c2405af287c3c46a927b3a1c
2017-07-28 20:49:49 +00:00
Lei Yu
90db9083ad Merge "Turn off some anomaly detectors by default" into oc-dr1-dev
am: f940431d32

Change-Id: I1d3672b40a0de6dfe481295134a5cb9eeea91b89
2017-07-28 20:49:48 +00:00
Lei Yu
f940431d32 Merge "Turn off some anomaly detectors by default" into oc-dr1-dev 2017-07-28 20:39:57 +00:00
jackqdyulei
c27d74d08e Create wrapper and shadow for AccessibilityManager
This is for testing, because robolectric doesn't recognize new
API.

Bug: 62022517
Test: Build
Change-Id: I1c150d86366305eacf3245bbabdf3d3e26124c77
2017-07-28 13:12:15 -07:00
Fan Zhang
83a427c543 Merge "Query search result intent before launching to avoid crash" into oc-dr1-dev am: 9f93faf7ae am: 81840033e3
am: 7a07f68794

Change-Id: Ib8f446f2bbde28ce98e7ad4e33550d7fdb8ad069
2017-07-28 19:38:53 +00:00
Fan Zhang
7a07f68794 Merge "Query search result intent before launching to avoid crash" into oc-dr1-dev am: 9f93faf7ae
am: 81840033e3

Change-Id: I6898c45e13ee4418fb83d78e77303dbfa097888b
2017-07-28 19:34:13 +00:00
Fan Zhang
81840033e3 Merge "Query search result intent before launching to avoid crash" into oc-dr1-dev
am: 9f93faf7ae

Change-Id: I5c0dc1366be5059fe7387831c3ee88cf9dfa0b43
2017-07-28 19:29:44 +00:00
Fan Zhang
ae0dbe3e13 Merge "Query search result intent before launching to avoid crash" into oc-dr1-dev
am: 9f93faf7ae

Change-Id: I596f52f4db123c3df485a1a194966771706650db
2017-07-28 19:29:44 +00:00
TreeHugger Robot
9f93faf7ae Merge "Query search result intent before launching to avoid crash" into oc-dr1-dev 2017-07-28 19:21:45 +00:00
Doris Ling
c2b7f12f30 Merge "Fix null pointer exception when updating action bar shadow." into oc-mr1-dev am: 51fb9ad956
am: 7cdb94384f

Change-Id: Iae7f415054b1848a4c33d89e176f38fb942ded03
2017-07-28 18:07:34 +00:00
Doris Ling
51fb9ad956 Merge "Fix null pointer exception when updating action bar shadow." into oc-mr1-dev 2017-07-28 17:03:49 +00:00
jackqdyulei
5a3be2874e Turn off some anomaly detectors by default
1. Wakeup alarm detector
   Because we cannot distinguish it between foreground and background
2. Bluetooth unoptimized scanning detector
   There is a bug in framework that may undercount the scanning time

Bug: 63390581
Bug: 63964363
Test: RunSettingsRoboTests
Change-Id: Ia762f580462823e8eddccbeb12dec3876b0ef47a
2017-07-28 09:39:32 -07:00
jackqdyulei
52aeaefbbe Add ResultPayload for Allow notification dots
am: c50495ba06

Change-Id: I98790c3e21e28a9b4a6c7bb976c2c512f427ef09
2017-07-28 02:40:02 +00:00
Fan Zhang
2d28a4ceb4 Unify action buttons to a common widget (part 1)
- Create a preference type to host action button preferences.
- Convert app battery usage page to use the new preference
- Convert wifi detail page to use the new preference

Change-Id: I60bc473986ab46f2897e2537eb0e013fa813a4fc
Fix: 63991885
Test: robotests
2017-07-28 01:00:39 +00:00
Fan Zhang
add4b5c413 Query search result intent before launching to avoid crash
If intent cannot launch, log error.

Change-Id: Ib6f37da467749be1ef09e6665dcab122e71a52d3
Fix: 64065678
Test: robotests
2017-07-28 00:52:04 +00:00
Doris Ling
1b2ec4f096 Merge "Limit the suggestions to be shown to 5." into oc-dr1-dev
am: 70f0013e43

Change-Id: I560de5fdb872558edd6315e377bd5b01399412a8
2017-07-27 23:53:47 +00:00
jackqdyulei
c50495ba06 Add ResultPayload for Allow notification dots
Bug: 62022517
Test: robotests
Change-Id: I86caa1c8604ae8eff27574ca45b5e9f3f6830f8f
Merged-In: I86caa1c8604ae8eff27574ca45b5e9f3f6830f8f
2017-07-27 16:53:40 -07:00
TreeHugger Robot
70f0013e43 Merge "Limit the suggestions to be shown to 5." into oc-dr1-dev 2017-07-27 23:41:35 +00:00
TreeHugger Robot
1f34a5cf46 Merge "Limit the suggestions to be shown to 5." into oc-mr1-dev 2017-07-27 21:14:43 +00:00
Doris Ling
2798c24deb Limit the suggestions to be shown to 5.
- when creating the dashboard data, pass the sublist of suggestions to
cap the total number of suggestions to be shown to 5.
- if user swipe away the suggestion, it will only remove the suggestion
from the suggestion adapater, and will not trigger rebuilding the whole
UI.

Change-Id: I3bbc08bb67c411ff5671a837efa40da0ac885983
Merged-In: I1efabeb2a805c670007c631d3ccb0fdfbde7b55a
Fix: 64072051
Test: make RunSettingsRoboTests
2017-07-27 12:50:47 -07:00
jackqdyulei
8541d8905a Merge "Don't update the header when toggle menu" into oc-dr1-dev
am: 4ab4966e7a

Change-Id: I3a814981c648d9b777d2fbf5a2d243864aaaee3c
2017-07-27 18:21:16 +00:00