Bug: 173745486
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryHistoryPreferenceTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryInfoLoaderTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryInfoTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryUtilsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.batterytip.detectors
Change-Id: I469ff8b88aa3307422c02f51943df4ef1759db56
This change is to update the related UI in the battery page if the
battery is not present. This includes the following updates:
1. Update the summary of battery tile in the Settings homepage
2. Replace the battery level with "Unknown"
3. Replace the summary with help message in the battery page
4. Remove the battery meter icon
Bug: 171368508
Test: verify on an issue device
Change-Id: I892e0d137143160a0bce0c11ce9265120ebb8fd4
Restricted App list can be update in RestrictedAppDetails page and
go back to SmartBatterySettings page without update the App list.
We need to update the list in updateState() again.
Fixes: 140585454
Test: manual, robolectric
Change-Id: I48a197351ffb9b07490f1de7ba1f7417102458a2
restartBatteryStatsLoader made a loader existed in fragment. onStart
will resume the loader. onResume registers mBatteryBroadcastReceiver
will caused the loader activated the second time. We move
restartBatteryStatsLoader to onStart can reduce the loader runs only
once.
Fixes: 140488811
Test: manual
Change-Id: I4cac574ea8e9c07c1a9df48a57fb8140d5687b21
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
Add a type for battery receiver, then in callback client know for
which reason it been invoked:
1. battery level change
2. battery saver state change
3. battery plug state change
So in this CL, we won't update battery tip for battery level change,
then battery tip won't be dismissed by itself.
Also note in onResume() we will manually update battery tip. So if
user stay in battery settings page and close the screen, once he opens
it we will still force update everything.
Fixes: 79171742
Test: RunSettingsRoboTests
Change-Id: I997844216fd8267e545d74e0d434de9e338f76a1
LicenseHtmlGeneratorFromXml, LicenseHtmlLoader and indirecly AsyncLoader
shoud be commonly used by Settings and TvSettings.
So this CL will move them to SettingsLib.
Test: building succeeded and tested on sailfish.
make ROBOTEST_FILTER=SettingsLicenseActivityTest RunSettingsRoboTests
Change-Id: I12e9169b1d3d313a6c5da0d575a6526327268381
After ag/2573096, the batterystats will be refreshed after each
broadcastReceiver registeration. And this registeration happens
in onResume().
So we don't need to init batterystats in onCreate() anymore.
Bug: 65629008
Test: RunSettingsRoboTests
Change-Id: I4ed2d420c6f2bb77d726dac4dd58fa6704ce6929
This CL adds logging to areas which are possible suspects for
the slowdown some people have been reporting in the
PowerUsageAdvanced screen. It times the time it takes for various
battery stats methods as well as the time it takes to draw things.
Test: still build (only adds logging)
Bug: 62959645
Bug: 63442960
Change-Id: I7e6c5e83e33a931057c9fdef14d3bef84f514940
In PowerUsageBase, it will store battery stats if it has a configuration
change, which will make BatteryStatsLoaderHelper never get the correct
battery stats because it uses Bundle.EMPTY as the bundle message.
This cl:
1. Remove the store action even though it is configuration change.
2. Always use null to get battery stats
3. Always start a battery status check in register()
Bug: 63658232
Test: RunSettingsRoboTests
Change-Id: Ifbf970c63378ed66dddcdae4d952b7d1fd84216a
It takes 3-4 seconds to load the battery settings page in Ryu. Main
reason is that it takes too long to init BatteryStatsHelper.
This cl moves loading code to AsyncLoader, and we will refresh ui once
the loading part is finished.
Following cl will add animation for the battery header to make it not
so janky
Bug: 37196170
Test: RunSettingsRoboTest
Change-Id: I40dfdde4a072e28a56c8fdf0ec6d671b5109fc6d
Before this cl, the battery text in SettingsActivity is one time
update, won't refresh based on real battery status.
This cl elicits BatteryBroadcastReceiver from PowerUsageBase and
make it reusable in both SettingsActivity and battery page.
BatteryBroadcastReceiver will invoke callback if:
1. Battery level changed on integer level(100->99)
2. Battery status has changed(i.e. charging)
Bug: 29346753
Test: RunSettingsRoboTests
Change-Id: If522d15a700ccbc8bae24f5712e05ec27ea4cbfa
1. Show gauge icon at the top of battery main page instead of
battery usage graph.
2. Move the click action from battery usage graph to gauge icon.
Bug: 34387464
Test: RunSettingsRoboTest
Change-Id: Ib182619d6805b401cde03a50e2ae907cf4df7b94
The items been added to group are: Adaptive brightness, Sleep.
Battery saver has been moved into this group as well.
Also refactor the code a little bit to make it fit the
preferenceController. Whole refactor of PowerUsageSummary and
PowerUsageDetail will be tracked in b/34386721
Bug: 34279051
Test: runSettingsRoboTests & Screenshot
Change-Id: I702d8479d1b80f7e9cf1a46752c75bf5d189e0f6
- Strings not final!
- New UX for power usage details (more preferency)
- Add high power apps list shows on/off and screen to
change (when possible)
- Link from power usage summary to high power list
- Link from advanced apps to high power list
Bug: 19991702
Change-Id: I97c927ed82d3b89041e4429b427508545763d66c