When the suggestions are in default mode and the number of suggestions
are more than the default count, we set the sublist of the suggestions
list as the suggestion adapter data. In this case, operation on the
suggestions list should be done in the sublist instead of the original
list to maintain the list consistency check.
Hence, when dismissing the suggestion, change to remove the suggestion
from the sugestion adapter instead of from the dashboard adapter, so
that any following interaction with the suggestions will not trigger the
concurrent modification exception.
Change-Id: I4caba74cfcc7bd0d53ad8c7dffcb127b3ebd845d
Merged-In: I970b6af8a1c72bc0c3ee89fef890ae6a669c71d2
Fix: 64279080
Test: make RunSettingsRoboTests
Use the regular preference layout for AccountTypePreference so that the
icon size will be the standard size.
Change-Id: I58a9e2d02b94f5abd9c8bb546f3d4e2984b3d6c6
Fix: 63660734
Test: visual
Since the related bug in battery stats is fixed, it is safe to
turn it on.
Also fix a bug in LocationCheckAction. In PermissionChecker we should
use permission name to check, not permission group name.
Bug: 64255601
Test: RunSettingsRoboTests
Change-Id: Ief8b5dc98f8a7ae462eb84936f6f61d626d7cddd
Made the availability and setting logic static so that
it can be invoked without creating a controller.
Bug: 62022517
Test: robotests
Change-Id: I3a51c61849e6ba8b8aa850ca22d666a9f84d252f
These classes are used for accessibility service. Also
add a new Availablity type.
Bug: 62022517
Test: Build
Change-Id: Ia2ff72dd04fd99b17809822907746c2411cecb62
Merged-In: Ia2ff72dd04fd99b17809822907746c2411cecb62
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
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
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
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
- 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
Some utility methods in UsbBackend were needed elsewhere so this CL
increases their visibility slightly rather than copying the code.
Test: Robotests still pass
Bug: 62271803
Change-Id: If8ac5494e306ac7f4f6d8eeef75f516308c78026