in the new design, we should store all data into the databae for showing
the battery history, we should not filter the items first from the
consumed battery value threshold
Bug: 191468827
Test: make SettingsRoboTests
Change-Id: I19d971fc5cdcc40af1693dc8ba2c78586da22d49
- Add new battery entry to app info battery preference, support both
legacy and new args, controlled by P/H
- Add a method to check is work profile app or not, use owner context to
query correct context for feature provider
- Add string for new args
Bug: 178197718
Test: make RunSettingsRoboTests
Change-Id: Ic93142a0c5e2851917cb3e224340a6e3e81fd801
The gist of the issue is that many apps have two UIDs associated
with them: a regular, "real" UID, e.g. 10123, and a shared group GID,
e.g. 50123, which is used for multiuser support.
Prior to this fix, the code in BatteryAppListPreferenceController,
would go over the list of all UidBatteryConsumers and would randomly
encounter either the "real" UID or the shared GID for each app first.
The UidBatteryConsumer for a shared GID does not have all of the
properties of the real UID, so some information, such as
time-in-foreground and time-in-background would be lost with
a high probability.
After this fix, we process "real" UIDs before shared GIDs ensuring
that time-in-* and other properties such as package names are obtained
for the real UID. When we later encounter a shared GID for the same app,
we just add the consumed power and time-in-* durations to the real UID's
BatteryEntry.
Bug: 188656360
Test: make RunSettingsRoboTests
Test: make RunSettingsGoogleRoboTests
Change-Id: I4bfea813ac5eb8f866804b2c4a9153eb877fb325
1. fix the chart % info will flash issue by deferring the showing time
until the chart content is ready to show (set default as invisible)
2. fix the category title will flash issue by set the default value as
empty to avoid refresh the title twice in the start time
Bug: 177406865
Test: make SettingsRoboTests
Change-Id: If8f247cf5b01c529bc5e4d18fcf409ba296cc2f4
In the original design, BatteyEntry will load icon and label in the
background thread and cache them into memory, but we don't need such
information in the periodic fetching job. Add a method to disable it to
improve the performance and memory footprint.
Bug: 185207505
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Iba759256e94159fce243ff4d700a8adf9e92f82c
- Update the usage and the test case
- Update discharging string to follow new string doc
Bug: 183689347
Test: make RunSettingsRoboTests
Change-Id: I1e14e7da8cb02755d8cf6e12626a0d94fad87121
Export a method to fetch BatteryEntry for battery usage new design, and
we have to fetch the label name each time when the new UI is shown to
avoid locale is changed from database records.
Bug: 180607705
Test: make RunSettingsRoboTests
Test: make RunSettingsGoogleRoboTests
Change-Id: Iae8f0b4812beb760b690e622f707fb67388221a2
For now, keep both BatteryStatsHelper and BatteryUsageStats in play.
The plan is to transition from the former to the latter, one usage
at a time. When all is said and done, all references to
BatteryStatsHelper will be gone.
Bug: 173745486
Test: atest --host SettingsRoboTests
Change-Id: I37e1dfff0043b1845992f18d72067bb547bb69ff
"Google" app is quicksearchbox which always has a foreground service running.
This causes it shows a huge usage time.
So, we make the summary invisible now.
Test: Rebuild and visual
Change-Id: Iba8083cc058e1d391dc20610fb6eb140c2c25350
Fix: 144063003
- Normally uid is start from 0. That was a bug in framework during
some time period, and was not reproduced later. We just remove this
kind of invalid item from UI.
Fixes: 141404334
Test: manual
Change-Id: I964a8b8af18ac6a5d8d2dea89722ea466e27e6ad
1. In High usage dialog, show top apps based on battery usage, not app
time.
2. Refactor the check for hidden system modules into ShouldHideSipper,
however don't smear it, this is also the current logic before this CL.
Bug: 133445008
Test: RunSettingsRoboTests
Change-Id: I851a1c9ef9b79a934ba0501cd96001f2e450bda4
- check whether an app is system hidden module and do not show them in
recent apps list and battery usage list.
Bug: 120546598
Test: make RunSettingsRoboTests
Change-Id: I9080c9d39095890f3a3ebc7fce839dcf984a92d6
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
In P, we only show 10 app that used most battery, in some case it may
make battery percentage counting inaccurate. Increase the size to
mitigate this issue.
Bug: 112406521
Test: Build
Change-Id: I5a4ddc90d5f33af5fe66bc1129ae3ed6f8fc3fcd
1. Remove unused class and resources
2. Update function in AdvancedPowerUsageDetail since
we don't need pass in anomaly anymore
Change-Id: I96fbe5ddaae902b34b756c7aae0338e49afef1f3
Bug: 74529048
Test: 1. manual test in settings page. 2. robo test still pass
1. Message in high usage dialog
2. Title in app usage list
Change-Id: Iac610483e10e8d2a93a18ca664aec17d9561aaf8
Fixes: 78638843
Test: RunSettingsRoboTests
Add a menu to point to the new page
Bug: 73300636
Test: RunSettingsRoboTests
Change-Id: I9956e349cdbbe2cd752bdf65020a540a329bdee3
Merged-In: I9956e349cdbbe2cd752bdf65020a540a329bdee3
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
Many features are using the enhanced estimates but the copy for them
has gotten out of sync. This CL moves shared strings between Settings
and SysUI to SettingsLib and also updates features that use the
strings to have consistent behavior/text.
Test: Robotests
Bug: 65656091
Bug: 66909350
Bug: 67469159
Change-Id: Ie5ef1ed65429ca9805cff374f1439e5d61eb6591
If feature flag is on, then display the app list. Otherwise disable
it.
Bug: 70234293
Test: RunSettingsRoboTests
Change-Id: I1663f925abf95e0e4c1a46d98ca165303a76e979
Move the app list in battery settings to PreferenceController. So that
we can:
1. Clean the code in PowerUsageSummary
2. Make it easy to add/move the app list to other place in furture.
This cl:
1. Move and make it invisible since in P we don't show app list in
battery main page.
2. Move related test to BatteryAppListPreferenceControllerTest
Bug: 70234293
Test: RunSettingsRoboTests
Change-Id: Ice7a42394916ff5e71305bfe22f5c35868d87fc7