/frameworks/base/services/core/java/com/android/server/power/stats/ |
D | CameraPowerCalculator.java | 56 double powerMah; in calculate() local 58 powerMah = uCtoMah(consumptionUc); in calculate() 60 powerMah = mPowerEstimator.calculatePower(durationMs); in calculate() 66 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_CAMERA, powerMah, powerModel); in calculate() 70 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_CAMERA, powerMah, powerModel); in calculate() 81 double powerMah; in calculateApp() local 83 powerMah = uCtoMah(consumptionUc); in calculateApp() 85 powerMah = mPowerEstimator.calculatePower(durationMs); in calculateApp() 89 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_CAMERA, powerMah, powerModel); in calculateApp()
|
D | GnssPowerCalculator.java | 63 final double powerMah = calculateApp(app, app.getBatteryStatsUid(), powerModel, in calculate() local 66 appsPowerMah += powerMah; in calculate() 72 double powerMah; in calculate() local 74 powerMah = uCtoMah(consumptionUC); in calculate() 76 powerMah = appsPowerMah; in calculate() 80 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_GNSS, powerMah, powerModel); in calculate() 90 final double powerMah; in calculateApp() local 93 powerMah = uCtoMah(consumedEnergyUC); in calculateApp() 97 powerMah = computePower(durationMs, averageGnssPowerMa); in calculateApp() 101 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_GNSS, powerMah, powerModel); in calculateApp() [all …]
|
D | AudioPowerCalculator.java | 40 public double powerMah; field in AudioPowerCalculator.PowerAndDuration 68 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_AUDIO, total.powerMah); in calculate() 73 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_AUDIO, total.powerMah); in calculate() 80 final double powerMah = mPowerEstimator.calculatePower(durationMs); in calculateApp() local 82 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_AUDIO, powerMah); in calculateApp() 85 total.powerMah += powerMah; in calculateApp()
|
D | VideoPowerCalculator.java | 37 public double powerMah; field in VideoPowerCalculator.PowerAndDuration 65 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_VIDEO, total.powerMah); in calculate() 70 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_VIDEO, total.powerMah); in calculate() 77 final double powerMah = mPowerEstimator.calculatePower(durationMs); in calculateApp() local 79 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_VIDEO, powerMah); in calculateApp() 82 total.powerMah += powerMah; in calculateApp()
|
D | WakelockPowerCalculator.java | 37 public double powerMah; field in WakelockPowerCalculator.PowerAndDuration 66 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_WAKELOCK, result.powerMah); in calculate() 69 appPowerMah += result.powerMah; in calculate() 75 osPowerMah = result.powerMah; in calculate() 84 final double remainingPowerMah = result.powerMah; in calculate() 128 result.powerMah = mPowerEstimator.calculatePower(result.durationMs); in calculateApp() 129 if (DEBUG && result.powerMah != 0) { in calculateApp() 131 + " power=" + BatteryStats.formatCharge(result.powerMah)); in calculateApp() 147 result.powerMah = osPowerMah + power; in calculateRemaining() 150 result.powerMah = 0; in calculateRemaining()
|
D | CpuPowerCalculator.java | 58 public double powerMah; field in CpuPowerCalculator.Result 125 totalPowerMah += result.powerMah; in calculate() 149 app.setConsumedPower(BatteryConsumer.POWER_COMPONENT_CPU, result.powerMah, powerModel) in calculateApp() 217 double powerMah = result.perProcStatePowerMah[key.processState]; in calculateModeledPowerPerProcessState() local 218 powerMah += mCpuActivePowerEstimator.calculatePower(cpuActiveTime); in calculateModeledPowerPerProcessState() 219 app.setConsumedPower(key, powerMah, BatteryConsumer.POWER_MODEL_POWER_PROFILE) in calculateModeledPowerPerProcessState() 229 final double powerMah; in calculatePowerAndDuration() local 232 powerMah = uCtoMah(consumptionUC); in calculatePowerAndDuration() 236 powerMah = calculateUidModeledPowerMah(u, statsType); in calculatePowerAndDuration() 240 if (DEBUG && (durationMs != 0 || powerMah != 0)) { in calculatePowerAndDuration() [all …]
|
D | BluetoothPowerCalculator.java | 47 public double powerMah; field in BluetoothPowerCalculator.PowerAndDuration 108 + " power=" + BatteryStats.formatCharge(powerAndDuration.powerMah)); in calculate() 116 Math.max(powerAndDuration.powerMah, powerAndDuration.totalPowerMah), in calculate() 141 BatteryConsumer.POWER_COMPONENT_BLUETOOTH, powerAndDuration.powerMah, in calculateApp() 146 powerAndDuration.totalPowerMah += powerAndDuration.powerMah; in calculateApp() 170 powerAndDuration.powerMah = 0; in calculatePowerAndDuration() 187 powerAndDuration.powerMah = uCtoMah(consumedEnergyUC); in calculatePowerAndDuration() 203 final double powerMah = in calculatePowerAndDuration() local 206 if (powerMah != 0) { in calculatePowerAndDuration() 207 powerAndDuration.powerMah = powerMah; in calculatePowerAndDuration() [all …]
|
D | WifiPowerCalculator.java | 50 public double powerMah; field in WifiPowerCalculator.PowerDurationAndTraffic 118 totalAppPowerMah += powerDurationAndTraffic.powerMah; in calculate() 124 powerDurationAndTraffic.powerMah, powerModel); in calculate() 152 totalAppPowerMah + powerDurationAndTraffic.powerMah, powerModel); in calculate() 190 powerDurationAndTraffic.powerMah = in calculateApp() 193 powerDurationAndTraffic.powerMah = uCtoMah(consumptionUC); in calculateApp() 196 if (DEBUG && powerDurationAndTraffic.powerMah != 0) { in calculateApp() 199 powerDurationAndTraffic.powerMah)); in calculateApp() 223 powerDurationAndTraffic.powerMah = 0; in calculateApp() 238 powerDurationAndTraffic.powerMah = calcPowerWithoutControllerDataMah( in calculateApp() [all …]
|
D | ScreenPowerCalculator.java | 50 public double powerMah; field in ScreenPowerCalculator.PowerAndDuration 99 appPowerAndDuration.powerMah, powerModel); in calculate() 101 totalAppPower += appPowerAndDuration.powerMah; in calculate() 110 totalAppPower = totalPowerAndDuration.powerMah; in calculate() 117 Math.max(totalPowerAndDuration.powerMah, totalAppPower), powerModel) in calculate() 138 totalPowerAndDuration.powerMah = uCtoMah(consumptionUC); in calculateTotalDurationAndPower() 142 totalPowerAndDuration.powerMah = calculateTotalPowerFromBrightness(batteryStats, in calculateTotalDurationAndPower() 154 appPowerAndDuration.powerMah = 0; in calculateAppUsingEnergyConsumption() 158 appPowerAndDuration.powerMah = uCtoMah(chargeUC); in calculateAppUsingEnergyConsumption() 208 final double totalScreenPowerMah = totalPowerAndDuration.powerMah; in smearScreenBatteryDrain() [all …]
|
D | FlashlightPowerCalculator.java | 51 final double powerMah = mPowerEstimator.calculatePower(durationMs); in calculate() local 55 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_FLASHLIGHT, powerMah); in calculate() 59 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_FLASHLIGHT, powerMah); in calculate() 67 final double powerMah = mPowerEstimator.calculatePower(durationMs); in calculateApp() local 69 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_FLASHLIGHT, powerMah); in calculateApp()
|
D | MemoryPowerCalculator.java | 50 final double powerMah = calculatePower(batteryStats, rawRealtimeUs, in calculate() local 55 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_MEMORY, powerMah); in calculate() 69 double powerMah = 0; in calculatePower() local 75 powerMah += estimator.calculatePower(usageDurationMs); in calculatePower() 77 return powerMah; in calculatePower()
|
D | SensorPowerCalculator.java | 69 final double powerMah = calculatePowerMah(u, rawRealtimeUs, in calculateApp() local 73 .setConsumedPower(BatteryConsumer.POWER_COMPONENT_SENSORS, powerMah); in calculateApp() 74 return powerMah; in calculateApp() 95 double powerMah = 0; in calculatePowerMah() local 111 powerMah += (sensorTime * s.getPower()) / (1000 * 60 * 60); in calculatePowerMah() 115 return powerMah; in calculatePowerMah()
|
D | SystemServicePowerCalculator.java | 145 double powerMah = 0; in calculatePowerUsingPowerProfile() local 148 powerMah += mPowerEstimators[i].calculatePower(systemServiceTimeAtCpuSpeeds[i] / 1000); in calculatePowerUsingPowerProfile() 152 Log.d(TAG, "System service power:" + powerMah); in calculatePowerUsingPowerProfile() 154 return powerMah; in calculatePowerUsingPowerProfile()
|
D | AmbientDisplayPowerCalculator.java | 59 final double powerMah = calculateTotalPower(powerModel, batteryStats, rawRealtimeUs, in calculate() local 65 powerMah, powerModel); in calculate()
|
/frameworks/base/core/java/android/os/ |
D | PowerComponents.java | 336 final double powerMah = getConsumedPower(key); in writeToXml() local 338 if (powerMah == 0 && durationMs == 0) { in writeToXml() 348 if (powerMah != 0) { in writeToXml() 349 serializer.attributeDouble(null, BatteryUsageStats.XML_ATTR_POWER, powerMah); in writeToXml() 367 final double powerMah = getConsumedPowerForCustomComponent(componentId); in writeToXml() local 369 if (powerMah == 0 && durationMs == 0) { in writeToXml() 375 if (powerMah != 0) { in writeToXml() 376 serializer.attributeDouble(null, BatteryUsageStats.XML_ATTR_POWER, powerMah); in writeToXml() 404 double powerMah = 0; in parseXml() local 416 powerMah = parser.getAttributeDouble(i); in parseXml() [all …]
|
/frameworks/base/tools/powermodel/src/com/android/powermodel/component/ |
D | ModemRemainderActivity.java | 72 result.powerMah += result.strengthMah[i]; in applyProfile() 77 result.powerMah += result.scanningMah; in applyProfile() 82 result.powerMah += result.activeMah; in applyProfile()
|
D | ModemAppActivity.java | 70 result.powerMah = Conversion.msToHr( in applyProfile()
|
/frameworks/base/core/tests/batterystatstests/BatteryStatsViewer/src/com/android/frameworks/core/batterystatsviewer/ |
D | BatteryConsumerInfoHelper.java | 36 public double powerMah; field in BatteryConsumerInfoHelper.BatteryConsumerInfo 73 info.powerMah = uidBatteryConsumer.getConsumedPower(); in makeBatteryConsumerInfo() 142 info.powerMah = batteryUsageStats.getConsumedPower(); in makeAggregateBatteryConsumerInfo()
|
D | BatteryConsumerPickerActivity.java | 170 (BatteryConsumerInfoHelper.BatteryConsumerInfo a) -> a.powerMah) in loadInBackground() 250 String.format(Locale.getDefault(), "%.1f mAh", item.powerMah)); in onBindViewHolder()
|
D | BatteryStatsViewerActivity.java | 379 private void setPowerText(TextView textView, double powerMah) { in setPowerText() argument 380 textView.setText(String.format(Locale.getDefault(), "%.1f", powerMah)); in setPowerText() local
|
/frameworks/base/tools/powermodel/src/com/android/powermodel/ |
D | ComponentPower.java | 40 public double powerMah; field in ComponentPower
|
D | AppPower.java | 75 appPowerMah += componentPower.powerMah; in build()
|
/frameworks/base/tools/powermodel/test/com/android/powermodel/ |
D | PowerReportTest.java | 77 Assert.assertEquals(GMAIL_MODEM_MAH, modem.powerMah, EPSILON); in testModemApp() 100 Assert.assertEquals(REMAINDER_MODEM_MAH, modem.powerMah, EPSILON); in testModemRemainder()
|
/frameworks/base/core/tests/batterystatstests/BatteryUsageStatsProtoTests/src/com/android/internal/os/ |
D | BatteryUsageStatsPulledTest.java | 255 private long convertMahToDc(double powerMah) { in convertMahToDc() argument 256 return (long) (powerMah * 36 + 0.5); in convertMahToDc()
|
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/ |
D | BluetoothPowerCalculatorTest.java | 329 double powerMah, int durationMs, @BatteryConsumer.PowerModel int powerModel) { in assertBluetoothPowerAndDuration() argument 334 assertThat(consumedPower).isWithin(PRECISION).of(powerMah); in assertBluetoothPowerAndDuration()
|