Home
last modified time | relevance | path

Searched refs:UidBatteryConsumer (Results 1 – 25 of 57) sorted by relevance

123

/frameworks/base/core/java/android/os/
DBatteryUsageStats.java147 private final List<UidBatteryConsumer> mUidBatteryConsumers;
174 final UidBatteryConsumer.Builder uidBatteryConsumerBuilder = in BatteryUsageStats()
177 final UidBatteryConsumer consumer = uidBatteryConsumerBuilder.build(); in BatteryUsageStats()
296 public List<UidBatteryConsumer> getUidBatteryConsumers() { in getUidBatteryConsumers()
376 case UidBatteryConsumer.CONSUMER_TYPE_UID: { in BatteryUsageStats()
377 mUidBatteryConsumers.add(new UidBatteryConsumer(data)); in BatteryUsageStats()
497 final List<UidBatteryConsumer> consumers = getUidBatteryConsumers(); in writeUidBatteryConsumersProto()
503 final UidBatteryConsumer consumer = consumers.get(i); in writeUidBatteryConsumersProto()
505 final long fgMs = consumer.getTimeInStateMs(UidBatteryConsumer.STATE_FOREGROUND); in writeUidBatteryConsumersProto()
506 final long bgMs = consumer.getTimeInStateMs(UidBatteryConsumer.STATE_BACKGROUND); in writeUidBatteryConsumersProto()
[all …]
DUidBatteryConsumer.java41 public final class UidBatteryConsumer extends BatteryConsumer { class
78 UidBatteryConsumer(BatteryConsumerData data) { in UidBatteryConsumer() method in UidBatteryConsumer
82 private UidBatteryConsumer(@NonNull Builder builder) { in UidBatteryConsumer() method in UidBatteryConsumer
163 static UidBatteryConsumer create(BatteryConsumerData data) { in create()
164 return new UidBatteryConsumer(data); in create()
194 final UidBatteryConsumer.Builder consumerBuilder = in createFromXml()
335 public Builder add(UidBatteryConsumer consumer) { in add()
376 public UidBatteryConsumer build() { in build()
383 return new UidBatteryConsumer(this); in build()
DUserBatteryConsumer.java109 private List<UidBatteryConsumer.Builder> mUidBatteryConsumers;
124 public void addUidBatteryConsumer(UidBatteryConsumer.Builder uidBatteryConsumerBuilder) { in addUidBatteryConsumer()
138 UidBatteryConsumer.Builder uidBatteryConsumer = mUidBatteryConsumers.get(i); in build()
/frameworks/base/services/core/java/com/android/server/power/stats/
DPowerCalculator.java23 import android.os.UidBatteryConsumer;
55 final SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders = in calculate()
58 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in calculate()
71 protected void calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
DAudioPowerCalculator.java22 import android.os.UidBatteryConsumer;
58 final SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders = in calculate()
61 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in calculate()
76 private void calculateApp(UidBatteryConsumer.Builder app, PowerAndDuration total, in calculateApp()
DVideoPowerCalculator.java22 import android.os.UidBatteryConsumer;
55 final SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders = in calculate()
58 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in calculate()
73 private void calculateApp(UidBatteryConsumer.Builder app, PowerAndDuration total, in calculateApp()
DUserPowerCalculator.java24 import android.os.UidBatteryConsumer;
48 SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders = in calculate()
52 final UidBatteryConsumer.Builder uidBuilder = uidBatteryConsumerBuilders.valueAt(i); in calculate()
DCustomEnergyConsumerPowerCalculator.java23 import android.os.UidBatteryConsumer;
51 final SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders = in calculate()
54 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in calculate()
82 private double[] calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
DSystemServicePowerCalculator.java24 import android.os.UidBatteryConsumer;
84 final SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders = in calculate()
86 final UidBatteryConsumer.Builder systemServerConsumer = uidBatteryConsumerBuilders.get( in calculate()
101 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in calculate()
DSensorPowerCalculator.java24 import android.os.UidBatteryConsumer;
50 final SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders = in calculate()
53 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in calculate()
67 private double calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
DScreenPowerCalculator.java26 import android.os.UidBatteryConsumer;
87 final SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders = in calculate()
93 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in calculate()
193 SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders, in smearScreenBatteryDrain()
198 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in smearScreenBatteryDrain()
210 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in smearScreenBatteryDrain()
DGnssPowerCalculator.java23 import android.os.UidBatteryConsumer;
56 final SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders = in calculate()
59 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in calculate()
86 private double calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
DWakelockPowerCalculator.java23 import android.os.UidBatteryConsumer;
54 UidBatteryConsumer.Builder osBatteryConsumer = null; in calculate()
59 final SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders = in calculate()
62 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in calculate()
DCpuPowerCalculator.java22 import android.os.UidBatteryConsumer;
112 final SparseArray<UidBatteryConsumer.Builder> uidBatteryConsumerBuilders = in calculate()
115 final UidBatteryConsumer.Builder app = uidBatteryConsumerBuilders.valueAt(i); in calculate()
142 private void calculateApp(UidBatteryConsumer.Builder app, BatteryStats.Uid u, in calculateApp()
165 private void calculateEnergyConsumptionPerProcessState(UidBatteryConsumer.Builder app, in calculateEnergyConsumptionPerProcessState()
184 private void calculateModeledPowerPerProcessState(UidBatteryConsumer.Builder app, in calculateModeledPowerPerProcessState()
/frameworks/base/tests/BatteryStatsPerfTest/src/com/android/internal/os/
DBatteryUsageStatsPerfTest.java34 import android.os.UidBatteryConsumer;
74 List<UidBatteryConsumer> uidBatteryConsumers = in testGetBatteryUsageStats()
78 UidBatteryConsumer uidBatteryConsumer = uidBatteryConsumers.get(i); in testGetBatteryUsageStats()
128 final UidBatteryConsumer uidBatteryConsumer = in testBatteryUsageStatsTransferOverBinder()
182 final UidBatteryConsumer.Builder consumerBuilder =
185 .setTimeInStateMs(UidBatteryConsumer.STATE_FOREGROUND, i * 2000)
186 .setTimeInStateMs(UidBatteryConsumer.STATE_BACKGROUND, i * 1000);
/frameworks/base/core/tests/batterystatstests/BatteryStatsViewer/src/com/android/frameworks/core/batterystatsviewer/
DBatteryConsumerInfoHelper.java23 import android.os.UidBatteryConsumer;
51 final List<UidBatteryConsumer> consumers = in makeBatteryConsumerInfo()
53 for (UidBatteryConsumer consumer : consumers) { in makeBatteryConsumerInfo()
69 UidBatteryConsumer uidBatteryConsumer, PackageManager packageManager) { in makeBatteryConsumerInfo()
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DCameraPowerCalculatorTest.java23 import android.os.UidBatteryConsumer;
68 UidBatteryConsumer app1Consumer = mStatsRule.getUidBatteryConsumer(APP1_UID); in testTimerBasedModel()
76 UidBatteryConsumer app2Consumer = mStatsRule.getUidBatteryConsumer(APP2_UID); in testTimerBasedModel()
120 UidBatteryConsumer app1Consumer = mStatsRule.getUidBatteryConsumer(APP1_UID); in testEnergyConsumptionBasedModel()
128 UidBatteryConsumer app2Consumer = mStatsRule.getUidBatteryConsumer(APP2_UID); in testEnergyConsumptionBasedModel()
DGnssPowerCalculatorTest.java23 import android.os.UidBatteryConsumer;
66 UidBatteryConsumer consumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testTimerBasedModel()
105 UidBatteryConsumer consumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testMeasuredEnergyBasedModel()
113 UidBatteryConsumer consumer2 = mStatsRule.getUidBatteryConsumer(APP_UID2); in testMeasuredEnergyBasedModel()
DScreenPowerCalculatorTest.java27 import android.os.UidBatteryConsumer;
97 UidBatteryConsumer uid1 = mStatsRule.getUidBatteryConsumer(APP_UID1); in testMeasuredEnergyBasedModel()
109 UidBatteryConsumer uid2 = mStatsRule.getUidBatteryConsumer(APP_UID2); in testMeasuredEnergyBasedModel()
205 UidBatteryConsumer uid1 = mStatsRule.getUidBatteryConsumer(APP_UID1); in testMeasuredEnergyBasedModel_multiDisplay()
217 UidBatteryConsumer uid2 = mStatsRule.getUidBatteryConsumer(APP_UID2); in testMeasuredEnergyBasedModel_multiDisplay()
268 UidBatteryConsumer uid1 = mStatsRule.getUidBatteryConsumer(APP_UID1); in testPowerProfileBasedModel()
279 UidBatteryConsumer uid2 = mStatsRule.getUidBatteryConsumer(APP_UID2); in testPowerProfileBasedModel()
364 UidBatteryConsumer uid1 = mStatsRule.getUidBatteryConsumer(APP_UID1); in testPowerProfileBasedModel_multiDisplay()
375 UidBatteryConsumer uid2 = mStatsRule.getUidBatteryConsumer(APP_UID2); in testPowerProfileBasedModel_multiDisplay()
DWakelockPowerCalculatorTest.java24 import android.os.UidBatteryConsumer;
74 UidBatteryConsumer consumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testTimerBasedModel()
80 UidBatteryConsumer osConsumer = mStatsRule.getUidBatteryConsumer(Process.ROOT_UID); in testTimerBasedModel()
DBatteryUsageStatsTest.java38 import android.os.UidBatteryConsumer;
134 final Map<Integer, UidBatteryConsumer> consumersByUid = in testParcelability_largeNumberOfUids()
136 Collectors.toMap(UidBatteryConsumer::getUid, c -> c)); in testParcelability_largeNumberOfUids()
138 final UidBatteryConsumer uidBatteryConsumer = consumersByUid.get(i); in testParcelability_largeNumberOfUids()
198 final List<UidBatteryConsumer> uidBatteryConsumers = in testAdd()
200 for (UidBatteryConsumer uidBatteryConsumer : uidBatteryConsumers) { in testAdd()
355 final UidBatteryConsumer.Builder uidBuilder = in addUidBatteryConsumer()
453 final List<UidBatteryConsumer> uidBatteryConsumers = in assertBatteryUsageStats1()
456 for (UidBatteryConsumer uidBatteryConsumer : uidBatteryConsumers) { in assertBatteryUsageStats1()
508 private void assertUidBatteryConsumer(UidBatteryConsumer uidBatteryConsumer, in assertUidBatteryConsumer()
[all …]
DFlashlightPowerCalculatorTest.java23 import android.os.UidBatteryConsumer;
62 UidBatteryConsumer consumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testTimerBasedModel()
DBatteryStatsManagerTest.java27 import android.os.UidBatteryConsumer;
59 for (UidBatteryConsumer ubc : stats.getUidBatteryConsumers()) { in testBatteryUsageStatsDataConsistency()
/frameworks/base/core/tests/batterystatstests/BatteryStatsLoadTests/src/com/android/frameworks/core/batterystatsloadtests/
DPowerMetrics.java21 import android.os.UidBatteryConsumer;
53 UidBatteryConsumer selectedBatteryConsumer = null; in PowerMetrics()
54 for (UidBatteryConsumer uidBatteryConsumer : batteryUsageStats.getUidBatteryConsumers()) { in PowerMetrics()
/frameworks/base/core/tests/batterystatstests/BatteryUsageStatsProtoTests/src/com/android/internal/os/
DBatteryUsageStatsPulledTest.java30 import android.os.UidBatteryConsumer;
90 final List<android.os.UidBatteryConsumer> uidConsumers = bus.getUidBatteryConsumers(); in testGetStatsProto()
93 final BatteryUsageStatsAtomsProto.UidBatteryConsumer[] uidConsumersProto in testGetStatsProto()
190 android.os.UidBatteryConsumer uidConsumer, in assertSameUidBatteryConsumer()
191 BatteryUsageStatsAtomsProto.UidBatteryConsumer uidConsumerProto, in assertSameUidBatteryConsumer()
198 uidConsumer.getTimeInStateMs(android.os.UidBatteryConsumer.STATE_FOREGROUND), in assertSameUidBatteryConsumer()
201 uidConsumer.getTimeInStateMs(android.os.UidBatteryConsumer.STATE_BACKGROUND), in assertSameUidBatteryConsumer()
269 final UidBatteryConsumer.Builder uidBuilder = builder in buildBatteryUsageStats()

123