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
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
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
This allows Settings to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936
Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
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