am 36eadf9c: am 32ddd534: Merge "BatteryStats: Account for remaining OS wakelock time at the end of processing all apps" into mnc-dev
* commit '36eadf9c1d78b047d9e43bf28fe2de417cc1fce5': BatteryStats: Account for remaining OS wakelock time at the end of processing all apps
This commit is contained in:
@@ -480,6 +480,7 @@ public final class BatteryStatsHelper {
|
|||||||
final boolean forAllUsers = (asUsers.get(UserHandle.USER_ALL) != null);
|
final boolean forAllUsers = (asUsers.get(UserHandle.USER_ALL) != null);
|
||||||
mStatsPeriod = mTypeBatteryRealtime;
|
mStatsPeriod = mTypeBatteryRealtime;
|
||||||
|
|
||||||
|
BatterySipper osSipper = null;
|
||||||
final SparseArray<? extends Uid> uidStats = mStats.getUidStats();
|
final SparseArray<? extends Uid> uidStats = mStats.getUidStats();
|
||||||
final int NU = uidStats.size();
|
final int NU = uidStats.size();
|
||||||
for (int iu = 0; iu < NU; iu++) {
|
for (int iu = 0; iu < NU; iu++) {
|
||||||
@@ -526,15 +527,19 @@ public final class BatteryStatsHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (uid == 0) {
|
if (uid == 0) {
|
||||||
// The device has probably been awake for longer than the screen on
|
osSipper = app;
|
||||||
// time and application wake lock time would account for. Assign
|
|
||||||
// this remainder to the OS, if possible.
|
|
||||||
mWakelockPowerCalculator.calculateRemaining(app, mStats, mRawRealtime,
|
|
||||||
mRawUptime, mStatsType);
|
|
||||||
app.sumPower();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (osSipper != null) {
|
||||||
|
// The device has probably been awake for longer than the screen on
|
||||||
|
// time and application wake lock time would account for. Assign
|
||||||
|
// this remainder to the OS, if possible.
|
||||||
|
mWakelockPowerCalculator.calculateRemaining(osSipper, mStats, mRawRealtime,
|
||||||
|
mRawUptime, mStatsType);
|
||||||
|
osSipper.sumPower();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addPhoneUsage() {
|
private void addPhoneUsage() {
|
||||||
|
|||||||
Reference in New Issue
Block a user