BatteryStats: Remove too-verbose logging
Bug: 36972594 Test: manual Change-Id: I02976ed924550f73010a453d207d199b13307cfa
This commit is contained in:
@@ -1021,32 +1021,24 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Slog.d(TAG, "begin setBatteryStateLocked");
|
||||
try {
|
||||
synchronized (mStats) {
|
||||
final boolean onBattery = plugType == BatteryStatsImpl.BATTERY_PLUGGED_NONE;
|
||||
if (mStats.isOnBattery() == onBattery) {
|
||||
// The battery state has not changed, so we don't need to sync external
|
||||
// stats immediately.
|
||||
mStats.setBatteryStateLocked(status, health, plugType, level, temp,
|
||||
volt,
|
||||
chargeUAh, chargeFullUAh);
|
||||
return;
|
||||
}
|
||||
synchronized (mStats) {
|
||||
final boolean onBattery = plugType == BatteryStatsImpl.BATTERY_PLUGGED_NONE;
|
||||
if (mStats.isOnBattery() == onBattery) {
|
||||
// The battery state has not changed, so we don't need to sync external
|
||||
// stats immediately.
|
||||
mStats.setBatteryStateLocked(status, health, plugType, level, temp, volt,
|
||||
chargeUAh, chargeFullUAh);
|
||||
return;
|
||||
}
|
||||
} finally {
|
||||
Slog.d(TAG, "end setBatteryStateLocked");
|
||||
}
|
||||
|
||||
// Sync external stats first as the battery has changed states. If we don't sync
|
||||
// immediately here, we may not collect the relevant data later.
|
||||
updateExternalStatsSync("battery-state", BatteryStatsImpl.ExternalStatsSync.UPDATE_ALL);
|
||||
Slog.d(TAG, "begin setBatteryStateLocked");
|
||||
synchronized (mStats) {
|
||||
mStats.setBatteryStateLocked(status, health, plugType, level, temp, volt,
|
||||
chargeUAh, chargeFullUAh);
|
||||
}
|
||||
Slog.d(TAG, "end setBatteryStateLocked");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user