/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | BatteryStatsTimerTest.java | 43 TestTimer(Clocks clocks, int type, TimeBase timeBase, Parcel in) { in TestTimer() argument 44 super(clocks, type, timeBase, in); in TestTimer() 47 TestTimer(Clocks clocks, int type, TimeBase timeBase) { in TestTimer() argument 48 super(clocks, type, timeBase); in TestTimer() 139 TimeBase timeBase = new TimeBase(); in testRunning() local 142 TestTimer timer = new TestTimer(clocks, 0, timeBase); in testRunning() 164 TimeBase timeBase = new TimeBase(); in testParceling() local 168 TestTimer timer1 = new TestTimer(clocks, 0, timeBase); in testParceling() 187 TestTimer timer2 = new TestTimer(clocks, 0, timeBase, parcel); in testParceling() 221 TimeBase timeBase = new TimeBase(); in testResetNoDetach() local [all …]
|
D | BatteryStatsCounterTest.java | 32 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testCounter() local 33 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCounter() 35 final BatteryStatsImpl.Counter counter = new BatteryStatsImpl.Counter(timeBase); in testCounter() 38 timeBase.setRunning(false, 1, 1); in testCounter() 49 timeBase.setRunning(true, 2, 2); in testCounter() 59 timeBase.setRunning(false, 3, 3); in testCounter() 68 timeBase.setRunning(true, 4, 4); in testCounter() 80 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testParceling() local 81 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testParceling() 83 final BatteryStatsImpl.Counter origCounter = new BatteryStatsImpl.Counter(timeBase); in testParceling() [all …]
|
D | BatteryStatsDualTimerTest.java | 33 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testResetDetach() local 34 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testResetDetach() 39 null, BatteryStats.WAKE_TYPE_PARTIAL, null, timeBase, subTimeBase); in testResetDetach() 41 assertTrue(timeBase.hasObserver(timer)); in testResetDetach() 43 assertFalse(timeBase.hasObserver(timer.getSubTimer())); in testResetDetach() 50 assertTrue(timeBase.hasObserver(timer)); in testResetDetach() 57 assertFalse(timeBase.hasObserver(timer)); in testResetDetach() 58 assertFalse(timeBase.hasObserver(timer.getSubTimer())); in testResetDetach()
|
D | BatteryStatsDurationTimerTest.java | 36 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testStartStop() local 37 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testStartStop() 40 null, BatteryStats.WAKE_TYPE_PARTIAL, null, timeBase); in testStartStop() 43 timeBase.setRunning(true, /* uptimeUs */ 0, /* realtimeUs */ 100*1000); in testStartStop() 86 timeBase.setRunning(false, /* uptimeUs */ 10, /* realtimeUs */ 55000*1000); in testStartStop() 94 timeBase.setRunning(true, /* uptimeUs */ 10, /* realtimeUs */ 220100*1000); in testStartStop() 109 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testParceling() local 110 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testParceling() 113 null, BatteryStats.WAKE_TYPE_PARTIAL, null, timeBase); in testParceling() 118 timeBase.setRunning(true, clocks.uptimeMillis()*1000, clocks.elapsedRealtime()*1000); in testParceling() [all …]
|
D | BatteryStatsSamplingTimerTest.java | 58 final BatteryStatsImpl.TimeBase timeBase = Mockito.mock(BatteryStatsImpl.TimeBase.class); in testEndSampleAndContinueWhenTimeOrCountDecreases() local 60 timeBase); in testEndSampleAndContinueWhenTimeOrCountDecreases() 101 final BatteryStatsImpl.TimeBase timeBase = Mockito.mock(BatteryStatsImpl.TimeBase.class); in testFirstUpdateIsAbsorbed() local 103 BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testFirstUpdateIsAbsorbed() 112 timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testFirstUpdateIsAbsorbed() 143 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testSampleTimerSummaryParceling() local 144 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling() 146 BatteryStatsImpl.SamplingTimer timer = new BatteryStatsImpl.SamplingTimer(clocks, timeBase); in testSampleTimerSummaryParceling() 151 timeBase.setRunning(true, clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling() 171 timeBase.setRunning(false, clocks.uptimeMillis(), clocks.elapsedRealtime()); in testSampleTimerSummaryParceling() [all …]
|
D | BatteryStatsStopwatchTimerTest.java | 33 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in testCount() local 34 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCount() 36 null, BatteryStats.SENSOR, null, timeBase); in testCount() 40 timeBase.setRunning(false, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount() 61 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCount() 81 timeBase.setRunning(true, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount() 103 timeBase.init(clocks.uptimeMillis(), clocks.elapsedRealtime()); in testCount() 122 timeBase.setRunning(false, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount() 128 timeBase.setRunning(true, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount() 138 timeBase.setRunning(false, 1000 * clocks.realtime, 1000 * clocks.realtime); in testCount()
|
D | BatteryStatsSensorTest.java | 430 BatteryStatsImpl.TimeBase timeBase = bi.getOnBatteryTimeBase(); in testSensorResetTimes() local 432 timeBase.setRunning(true, clocks.uptime * 1000, clocks.realtime * 1000); in testSensorResetTimes() 440 timeBase.setRunning(false, clocks.uptime * 1000, clocks.realtime * 1000); in testSensorResetTimes() 483 timeBase.setRunning(true, clocks.uptime * 1000, clocks.realtime * 1000); in testSensorResetTimes()
|
D | BatteryStatsCpuTimesTest.java | 1309 final BatteryStatsImpl.TimeBase timeBase = new BatteryStatsImpl.TimeBase(); in getPartialTimers() local 1313 mClocks, u, WAKE_TYPE_PARTIAL, null, timeBase); in getPartialTimers()
|
/frameworks/base/core/java/com/android/internal/os/ |
D | BatteryStatsImpl.java | 1280 public Counter(TimeBase timeBase, Parcel in) { in Counter() argument 1281 mTimeBase = timeBase; in Counter() 1286 timeBase.add(this); in Counter() 1289 public Counter(TimeBase timeBase) { in Counter() argument 1290 mTimeBase = timeBase; in Counter() 1291 timeBase.add(this); in Counter() 1332 public static @Nullable Counter readCounterFromParcel(TimeBase timeBase, Parcel in) { in readCounterFromParcel() argument 1336 return new Counter(timeBase, in); in readCounterFromParcel() 1407 private LongSamplingCounterArray(TimeBase timeBase, Parcel in) { in LongSamplingCounterArray() argument 1408 mTimeBase = timeBase; in LongSamplingCounterArray() [all …]
|