Record important battery usage event into SharedPreference for dump()
Fix: 268300677 Test: presubmit Change-Id: If03106c265b984bc2608528bdf45386973e3a14f
This commit is contained in:
@@ -54,11 +54,13 @@ public final class BatteryUsageBroadcastReceiver extends BroadcastReceiver {
|
||||
if (intent == null || intent.getAction() == null) {
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, "onReceive:" + intent.getAction());
|
||||
final String action = intent.getAction();
|
||||
Log.d(TAG, "onReceive:" + action);
|
||||
DatabaseUtils.recordDateTime(context, action);
|
||||
final String fullChargeIntentAction = FeatureFactory.getFactory(context)
|
||||
.getPowerUsageFeatureProvider(context)
|
||||
.getFullChargeIntentAction();
|
||||
switch (intent.getAction()) {
|
||||
switch (action) {
|
||||
case Intent.ACTION_BATTERY_LEVEL_CHANGED:
|
||||
// Only when fullChargeIntentAction is ACTION_BATTERY_LEVEL_CHANGED,
|
||||
// ACTION_BATTERY_LEVEL_CHANGED will be considered as the full charge event and then
|
||||
|
Reference in New Issue
Block a user