Merge "Fix a few small battery stats problems:" into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
325192593b
@@ -1400,6 +1400,7 @@ public abstract class BatteryStats implements Parcelable {
|
||||
pw.println(getDischargeStartLevel());
|
||||
pw.print(prefix); pw.print(" Discharge cycle current level: ");
|
||||
pw.println(getDischargeCurrentLevel());
|
||||
} else {
|
||||
pw.print(prefix); pw.println(" Device is currently plugged into power");
|
||||
pw.print(prefix); pw.print(" Last discharge cycle start level: ");
|
||||
pw.println(getDischargeStartLevel());
|
||||
|
||||
@@ -3691,8 +3691,8 @@ public final class BatteryStatsImpl extends BatteryStats {
|
||||
mTrackBatteryPastRealtime += realtime - mTrackBatteryRealtimeStart;
|
||||
mDischargeCurrentLevel = level;
|
||||
if (level < mDischargeUnplugLevel) {
|
||||
mLowDischargeAmountSinceCharge = mDischargeUnplugLevel-level-1;
|
||||
mHighDischargeAmountSinceCharge = mDischargeUnplugLevel-level;
|
||||
mLowDischargeAmountSinceCharge += mDischargeUnplugLevel-level-1;
|
||||
mHighDischargeAmountSinceCharge += mDischargeUnplugLevel-level;
|
||||
}
|
||||
doPlugLocked(getBatteryUptimeLocked(uptime), getBatteryRealtimeLocked(realtime));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user