Merge "Prevent crash when power profile has incorrect freq counts" into sc-dev am: f0a755448b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13811169 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ib1c8c0a6325cf31406655bbaded19fb0544e4051
This commit is contained in:
@@ -134,7 +134,8 @@ public class SystemServicePowerCalculator extends PowerCalculator {
|
||||
// TODO(179210707): additionally account for CPU active and per cluster battery use
|
||||
|
||||
double powerMah = 0;
|
||||
for (int i = 0; i < mPowerEstimators.length; i++) {
|
||||
final int size = Math.min(mPowerEstimators.length, systemServiceTimeAtCpuSpeeds.length);
|
||||
for (int i = 0; i < size; i++) {
|
||||
powerMah += mPowerEstimators[i].calculatePower(systemServiceTimeAtCpuSpeeds[i]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user