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
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.
Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
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