Home
last modified time | relevance | path

Searched refs:BatteryStatsImpl (Results 1 – 25 of 56) sorted by relevance

123

/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DBatteryStatsSamplingTimerTest.java34 final BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, in testSettingStalePreservesData()
35 Mockito.mock(BatteryStatsImpl.TimeBase.class)); in testSettingStalePreservesData()
61 final BatteryStatsImpl.TimeBase timeBase = Mockito.mock(BatteryStatsImpl.TimeBase.class); in testEndSampleAndContinueWhenTimeOrCountDecreases()
62 final BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, in testEndSampleAndContinueWhenTimeOrCountDecreases()
111 final BatteryStatsImpl.TimeBase timeBase = Mockito.mock(BatteryStatsImpl.TimeBase.class); in testFirstUpdateIsAbsorbed()
113 BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testFirstUpdateIsAbsorbed()
122 timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testFirstUpdateIsAbsorbed()
153 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testSampleTimerSummaryParceling()
156 BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testSampleTimerSummaryParceling()
198 BatteryStatsImpl.SamplingTimer unparceledOnBatteryTimer = in testSampleTimerSummaryParceling()
[all …]
DBatteryStatsDurationTimerTest.java38 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testStartStop()
41 final BatteryStatsImpl.DurationTimer timer = new BatteryStatsImpl.DurationTimer(clocks, in testStartStop()
110 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testReset()
113 final BatteryStatsImpl.DurationTimer timer = new BatteryStatsImpl.DurationTimer(clocks, in testReset()
146 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testResetAndDetach()
149 final BatteryStatsImpl.DurationTimer timer = new BatteryStatsImpl.DurationTimer(clocks, in testResetAndDetach()
173 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testParceling()
176 final BatteryStatsImpl.DurationTimer timer = new BatteryStatsImpl.DurationTimer(clocks, in testParceling()
197 final BatteryStatsImpl.DurationTimer summary = new BatteryStatsImpl.DurationTimer(clocks, in testParceling()
215 final BatteryStatsImpl.DurationTimer full = new BatteryStatsImpl.DurationTimer(clocks, in testParceling()
DBatteryStatsCounterTest.java34 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testCounter()
37 final BatteryStatsImpl.Counter counter = new BatteryStatsImpl.Counter(timeBase); in testCounter()
74 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testParceling()
77 final BatteryStatsImpl.Counter origCounter = new BatteryStatsImpl.Counter(timeBase); in testParceling()
88 final BatteryStatsImpl.Counter summaryCounter = new BatteryStatsImpl.Counter(timeBase); in testParceling()
111 final BatteryStatsImpl.Counter fullParcelCounter = in testParceling()
112 new BatteryStatsImpl.Counter(timeBase, fullParcel); in testParceling()
DBatteryStatsDualTimerTest.java35 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testResetDetach()
37 final BatteryStatsImpl.TimeBase subTimeBase = new BatteryStatsImpl.TimeBase(); in testResetDetach()
40 final BatteryStatsImpl.DualTimer timer = new BatteryStatsImpl.DualTimer(clocks, in testResetDetach()
DBatteryExternalStatsWorkerTest.java19 import static com.android.server.power.stats.BatteryStatsImpl.ExternalStatsSync.UPDATE_ALL;
20 import static com.android.server.power.stats.BatteryStatsImpl.ExternalStatsSync.UPDATE_BT;
21 import static com.android.server.power.stats.BatteryStatsImpl.ExternalStatsSync.UPDATE_CAMERA;
22 import static com.android.server.power.stats.BatteryStatsImpl.ExternalStatsSync.UPDATE_CPU;
23 import static com.android.server.power.stats.BatteryStatsImpl.ExternalStatsSync.UPDATE_DISPLAY;
24 import static com.android.server.power.stats.BatteryStatsImpl.ExternalStatsSync.UPDATE_RADIO;
25 import static com.android.server.power.stats.BatteryStatsImpl.ExternalStatsSync.UPDATE_WIFI;
79 BatteryStatsImpl batteryStats = new BatteryStatsImpl( in setUp()
80 new BatteryStatsImpl.BatteryStatsConfig.Builder().build(), Clock.SYSTEM_CLOCK, in setUp()
DBatteryStatsTimeBaseTest.java39 static class TestTimeBase extends BatteryStatsImpl.TimeBase {
85 BatteryStatsImpl.TimeBaseObs observer1 = Mockito.mock(BatteryStatsImpl.TimeBaseObs.class); in testRunning()
86 BatteryStatsImpl.TimeBaseObs observer2 = Mockito.mock(BatteryStatsImpl.TimeBaseObs.class); in testRunning()
87 BatteryStatsImpl.TimeBaseObs observer3 = Mockito.mock(BatteryStatsImpl.TimeBaseObs.class); in testRunning()
DWifiPowerCalculatorTest.java82 private BatteryStatsImpl setupTestNetworkNumbers() { in setupTestNetworkNumbers()
83 BatteryStatsImpl batteryStats = mStatsRule.getBatteryStats(); in setupTestNetworkNumbers()
145 final BatteryStatsImpl batteryStats = setupTestNetworkNumbers(); in testPowerControllerBasedModel_nonMeasured()
182 final BatteryStatsImpl batteryStats = setupTestNetworkNumbers(); in testPowerControllerBasedModel_powerProfile_byProcessState()
186 BatteryStatsImpl.Uid uid = batteryStats.getUidStatsLocked(APP_UID); in testPowerControllerBasedModel_powerProfile_byProcessState()
237 final BatteryStatsImpl batteryStats = setupTestNetworkNumbers(); in testPowerControllerBasedModel_measured()
271 final BatteryStatsImpl batteryStats = setupTestNetworkNumbers(); in testPowerControllerBasedModel_measured_byProcessState()
275 BatteryStatsImpl.Uid uid = batteryStats.getUidStatsLocked(APP_UID); in testPowerControllerBasedModel_measured_byProcessState()
324 private BatteryStatsImpl setupTimerBasedModelTestNumbers() { in setupTimerBasedModelTestNumbers()
325 final BatteryStatsImpl batteryStats = setupTestNetworkNumbers(); in setupTimerBasedModelTestNumbers()
[all …]
DGnssPowerCalculatorTest.java57 BatteryStatsImpl.Uid uidStats = mStatsRule.getUidStats(APP_UID); in testTimerBasedModel()
89 BatteryStatsImpl.Uid uidStats = mStatsRule.getUidStats(APP_UID); in testMeasuredEnergyBasedModel()
93 BatteryStatsImpl.Uid uidStats2 = mStatsRule.getUidStats(APP_UID2); in testMeasuredEnergyBasedModel()
97 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testMeasuredEnergyBasedModel()
DBatteryStatsStopwatchTimerTest.java35 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testCount()
37 final BatteryStatsImpl.StopwatchTimer timer = new BatteryStatsImpl.StopwatchTimer(clocks, in testCount()
DAmbientDisplayPowerCalculatorTest.java54 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testMeasuredEnergyBasedModel()
91 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testMeasuredEnergyBasedModel_multiDisplay()
149 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testPowerProfileBasedModel()
175 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testPowerProfileBasedModel_multiDisplay()
DBatteryStatsBinderCallStatsTest.java83 BatteryStatsImpl.Uid uid = bi.getUidStatsLocked(workSourceUid); in testNoteBinderCallStats()
87 ArraySet<BatteryStatsImpl.BinderCallStats> stats = uid.getBinderCallStats(); in testNoteBinderCallStats()
89 BatteryStatsImpl.BinderCallStats value = stats.valueAt(0); in testNoteBinderCallStats()
DMobileRadioPowerCalculatorTest.java83 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testCounterBasedModel()
203 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testCounterBasedModel_multipleDefinedRat()
360 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testCounterBasedModel_legacyPowerProfile()
480 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testTimerBasedModel_byProcessState()
481 BatteryStatsImpl.Uid uid = stats.getUidStatsLocked(APP_UID); in testTimerBasedModel_byProcessState()
597 BatteryStatsImpl.PER_UID_MODEM_POWER_MODEL_MOBILE_RADIO_ACTIVE_TIME) in testMeasuredEnergyBasedModel_mobileRadioActiveTimeModel()
599 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testMeasuredEnergyBasedModel_mobileRadioActiveTimeModel()
675 BatteryStatsImpl.PER_UID_MODEM_POWER_MODEL_MODEM_ACTIVITY_INFO_RX_TX) in testMeasuredEnergyBasedModel_modemActivityInfoRxTxModel()
677 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testMeasuredEnergyBasedModel_modemActivityInfoRxTxModel()
859 BatteryStatsImpl.PER_UID_MODEM_POWER_MODEL_MODEM_ACTIVITY_INFO_RX_TX) in testMeasuredEnergyBasedModel_modemActivityInfoRxTxModel_legacyPowerProfile()
[all …]
DBluetoothPowerCalculatorTest.java70 BatteryStatsImpl batteryStats = mStatsRule.getBatteryStats(); in testTimerBasedModel()
101 BatteryStatsImpl batteryStats = mStatsRule.getBatteryStats(); in testTimerBasedModel_byProcessState()
103 BatteryStatsImpl.Uid uid = batteryStats.getUidStatsLocked(APP_UID); in testTimerBasedModel_byProcessState()
222 BatteryStatsImpl batteryStats = mStatsRule.getBatteryStats(); in testMeasuredEnergyBasedModel_byProcessState()
224 BatteryStatsImpl.Uid uid = batteryStats.getUidStatsLocked(APP_UID); in testMeasuredEnergyBasedModel_byProcessState()
DScreenPowerCalculatorTest.java62 BatteryStatsImpl batteryStats = mStatsRule.getBatteryStats(); in testMeasuredEnergyBasedModel()
149 BatteryStatsImpl batteryStats = mStatsRule.getBatteryStats(); in testMeasuredEnergyBasedModel_multiDisplay()
241 BatteryStatsImpl batteryStats = mStatsRule.getBatteryStats(); in testPowerProfileBasedModel()
314 BatteryStatsImpl batteryStats = mStatsRule.getBatteryStats(); in testPowerProfileBasedModel_multiDisplay()
398 BatteryStatsImpl batteryStats = mStatsRule.getBatteryStats(); in setProcState()
DBatteryChargeCalculatorTest.java61 final BatteryStatsImpl batteryStats = mStatsRule.getBatteryStats(); in testDischargeTotals()
104 final BatteryStatsImpl batteryStats = mStatsRule.getBatteryStats(); in testDischargeTotals_chargeUahUnavailable()
DLongSamplingCounterTest.java21 import static com.android.server.power.stats.BatteryStatsImpl.LongSamplingCounter;
22 import static com.android.server.power.stats.BatteryStatsImpl.TimeBase;
DBatteryStatsCpuTimesTest.java24 import static com.android.server.power.stats.BatteryStatsImpl.WAKE_LOCK_WEIGHT;
107 BatteryStatsImpl.UserInfoProvider mUserInfoProvider;
186 final ArrayList<BatteryStatsImpl.StopwatchTimer> partialTimers = getPartialTimers( in testMarkPartialTimersAsEligible()
188 final ArrayList<BatteryStatsImpl.StopwatchTimer> lastPartialTimers in testMarkPartialTimersAsEligible()
496 final ArrayList<BatteryStatsImpl.StopwatchTimer> partialTimers in testReadKernelUidCpuTimesLocked_withPartialTimers()
764 final ArrayList<BatteryStatsImpl.StopwatchTimer> partialTimers in testReadKernelUidCpuFreqTimesLocked_partialTimers()
1405 private ArrayList<BatteryStatsImpl.StopwatchTimer> getPartialTimers(int... uids) { in getPartialTimers()
1406 final ArrayList<BatteryStatsImpl.StopwatchTimer> partialTimers = new ArrayList<>(); in getPartialTimers()
1407 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in getPartialTimers()
1409 final BatteryStatsImpl.Uid u = mBatteryStatsImpl.getUidStatsLocked(uid); in getPartialTimers()
[all …]
DLongSamplingCounterArrayTest.java21 import static com.android.server.power.stats.BatteryStatsImpl.LongSamplingCounterArray;
22 import static com.android.server.power.stats.BatteryStatsImpl.TimeBase;
DCameraPowerCalculatorTest.java55 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testTimerBasedModel()
105 BatteryStatsImpl stats = mStatsRule.getBatteryStats(); in testEnergyConsumptionBasedModel()
/frameworks/base/config/
Dboot-profile.txt111 Lcom/android/internal/os/BatteryStatsImpl$TimeBase;->add(Lcom/android/internal/os/BatteryStatsImpl$…
112 …id/internal/os/BatteryStatsImpl$Timer;-><init>(Lcom/android/internal/os/BatteryStatsImpl$Clocks;IL…
114 Lcom/android/internal/os/BatteryStatsImpl$Timer;->readSummaryFromParcelLocked(Landroid/os/Parcel;)V
115 Lcom/android/internal/os/BatteryStatsImpl;->readSummaryFromParcel(Landroid/os/Parcel;)V
119 …nternal/os/BatteryStatsImpl$SamplingTimer;-><init>(Lcom/android/internal/os/BatteryStatsImpl$Clock…
120 Lcom/android/internal/os/BatteryStatsImpl$TimeBase;->isRunning()Z
121 …m/android/internal/os/BatteryStatsImpl;->getKernelWakelockTimerLocked(Ljava/lang/String;)Lcom/andr…
124BatteryStatsImpl$StopwatchTimer;-><init>(Lcom/android/internal/os/BatteryStatsImpl$Clocks;Lcom/and…
125 Lcom/android/internal/os/BatteryStatsImpl$StopwatchTimer;->readSummaryFromParcelLocked(Landroid/os/…
126 Lcom/android/internal/os/BatteryStatsImpl;->detachIfNotNull(Lcom/android/internal/os/BatteryStatsIm…
[all …]
/frameworks/base/services/core/java/com/android/server/power/stats/
DBatteryStatsImpl.aidl19 parcelable BatteryStatsImpl;
DBatteryUsageStatsProvider.java145 public List<BatteryUsageStats> getBatteryUsageStats(BatteryStatsImpl stats, in getBatteryUsageStats()
162 public BatteryUsageStats getBatteryUsageStats(BatteryStatsImpl stats, in getBatteryUsageStats()
167 private BatteryUsageStats getBatteryUsageStats(BatteryStatsImpl stats, in getBatteryUsageStats()
176 private BatteryUsageStats getCurrentBatteryUsageStats(BatteryStatsImpl stats, in getCurrentBatteryUsageStats()
333 private BatteryUsageStats getAggregatedBatteryUsageStats(BatteryStatsImpl stats, in getAggregatedBatteryUsageStats()
DBatteryStatsDumpHelperImpl.java37 return mBatteryUsageStatsProvider.getBatteryUsageStats((BatteryStatsImpl) batteryStats, in getBatteryUsageStats()
DBatteryExternalStatsWorker.java68 public class BatteryExternalStatsWorker implements BatteryStatsImpl.ExternalStatsSync {
102 private final BatteryStatsImpl mStats;
194 public BatteryExternalStatsWorker(Context context, BatteryStatsImpl stats) { in BatteryExternalStatsWorker()
199 BatteryExternalStatsWorker(Injector injector, BatteryStatsImpl stats) { in BatteryExternalStatsWorker()
546 if ((updateFlags & BatteryStatsImpl.ExternalStatsSync.UPDATE_WIFI) != 0) {
574 if ((updateFlags & BatteryStatsImpl.ExternalStatsSync.UPDATE_BT) != 0) {
613 if ((updateFlags & BatteryStatsImpl.ExternalStatsSync.UPDATE_RADIO) != 0) {
647 if ((updateFlags & BatteryStatsImpl.ExternalStatsSync.UPDATE_RPM) != 0) {
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DBatteryStatsServiceTest.java31 import com.android.server.power.stats.BatteryStatsImpl;
79 final BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics(); in testAwaitCompletion()

123