Home
last modified time | relevance | path

Searched refs:uidBatteryConsumer (Results 1 – 7 of 7) sorted by relevance

/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryUsageStatsTest.java124 final UidBatteryConsumer uidBatteryConsumer = consumersByUid.get(i); in testParcelability_largeNumberOfUids() local
125 assertThat(uidBatteryConsumer).isNotNull(); in testParcelability_largeNumberOfUids()
126 assertThat(uidBatteryConsumer.getConsumedPower()).isEqualTo(i * 100); in testParcelability_largeNumberOfUids()
180 for (UidBatteryConsumer uidBatteryConsumer : uidBatteryConsumers) { in testAdd()
181 if (uidBatteryConsumer.getUid() == APP_UID1) { in testAdd()
182 assertUidBatteryConsumer(uidBatteryConsumer, 2124, null, in testAdd()
185 } else if (uidBatteryConsumer.getUid() == APP_UID2) { in testAdd()
186 assertUidBatteryConsumer(uidBatteryConsumer, 1332, "bar", in testAdd()
190 fail("Unexpected UID " + uidBatteryConsumer.getUid()); in testAdd()
343 for (UidBatteryConsumer uidBatteryConsumer : uidBatteryConsumers) { in assertBatteryUsageStats1()
[all …]
DBatteryUsageStatsProviderTest.java87 final UidBatteryConsumer uidBatteryConsumer = uidBatteryConsumers.get(0); in test_getBatteryUsageStats() local
88 assertThat(uidBatteryConsumer.getTimeInStateMs(UidBatteryConsumer.STATE_FOREGROUND)) in test_getBatteryUsageStats()
90 assertThat(uidBatteryConsumer.getTimeInStateMs(UidBatteryConsumer.STATE_BACKGROUND)) in test_getBatteryUsageStats()
258 final UidBatteryConsumer uidBatteryConsumer = stats.getUidBatteryConsumers().stream() in testAggregateBatteryStats() local
260 assertThat(uidBatteryConsumer in testAggregateBatteryStats()
/frameworks/base/core/tests/batterystatstests/BatteryStatsLoadTests/src/com/android/frameworks/core/batterystatsloadtests/
DPowerMetrics.java54 for (UidBatteryConsumer uidBatteryConsumer : batteryUsageStats.getUidBatteryConsumers()) { in PowerMetrics()
55 if (uidBatteryConsumer.getUid() == uid) { in PowerMetrics()
56 selectedBatteryConsumer = uidBatteryConsumer; in PowerMetrics()
62 uidBatteryConsumer.getConsumedPower(component); in PowerMetrics()
64 uidBatteryConsumer.getUsageDurationMillis(component); in PowerMetrics()
/frameworks/base/core/tests/batterystatstests/BatteryStatsViewer/src/com/android/frameworks/core/batterystatsviewer/
DBatteryConsumerInfoHelper.java69 UidBatteryConsumer uidBatteryConsumer, PackageManager packageManager) { in makeBatteryConsumerInfo() argument
72 info.id = BatteryConsumerData.batteryConsumerId(uidBatteryConsumer); in makeBatteryConsumerInfo()
73 info.powerMah = uidBatteryConsumer.getConsumedPower(); in makeBatteryConsumerInfo()
74 int uid = uidBatteryConsumer.getUid(); in makeBatteryConsumerInfo()
76 String packageWithHighestDrain = uidBatteryConsumer.getPackageWithHighestDrain(); in makeBatteryConsumerInfo()
/frameworks/base/tests/BatteryStatsPerfTest/src/com/android/internal/os/
DBatteryUsageStatsPerfTest.java65 UidBatteryConsumer uidBatteryConsumer = uidBatteryConsumers.get(i); in testGetBatteryUsageStats() local
66 power += uidBatteryConsumer.getConsumedPower(); in testGetBatteryUsageStats()
/frameworks/base/core/java/android/os/
DUserBatteryConsumer.java165 UidBatteryConsumer.Builder uidBatteryConsumer = mUidBatteryConsumers.get(i); in build() local
167 uidBatteryConsumer.mPowerComponentsBuilder); in build()
DBatteryUsageStats.java514 private double getUidBatteryConsumerWeight(UidBatteryConsumer uidBatteryConsumer) { in getUidBatteryConsumerWeight() argument
515 final double consumedPower = uidBatteryConsumer.getConsumedPower(); in getUidBatteryConsumerWeight()
517 uidBatteryConsumer.getTimeInStateMs(UidBatteryConsumer.STATE_FOREGROUND); in getUidBatteryConsumerWeight()
519 uidBatteryConsumer.getTimeInStateMs(UidBatteryConsumer.STATE_BACKGROUND); in getUidBatteryConsumerWeight()