/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | BatteryStatsSamplingTimerTest.java | 43 assertEquals(1, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 44 assertEquals(10, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 48 assertEquals(1, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 49 assertEquals(10, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 53 assertEquals(1, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 54 assertEquals(10, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testSettingStalePreservesData() 69 assertEquals(0, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testEndSampleAndContinueWhenTimeOrCountDecreases() 70 assertEquals(0, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testEndSampleAndContinueWhenTimeOrCountDecreases() 76 assertEquals(0, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testEndSampleAndContinueWhenTimeOrCountDecreases() 77 assertEquals(0, timer.getTotalTimeLocked(200, BatteryStats.STATS_SINCE_CHARGED)); in testEndSampleAndContinueWhenTimeOrCountDecreases() [all …]
|
D | BatteryStatsStopwatchTimerTest.java | 47 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 49 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 51 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 53 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 58 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 66 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 69 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 75 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 78 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() 89 assertEquals(expectedCount, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCount() [all …]
|
D | BatteryStatsCounterTest.java | 46 assertEquals(0, counter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCounter() 54 assertEquals(4, counter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCounter() 61 assertEquals(4, counter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCounter() 67 assertEquals(6, counter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCounter() 82 assertEquals(3, origCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling() 94 assertEquals(4, summaryCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling() 99 assertEquals(4, summaryCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling() 104 assertEquals(6, summaryCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling() 116 assertEquals(7, fullParcelCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling() 121 assertEquals(7, fullParcelCounter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testParceling() [all …]
|
D | BatteryStatsImplTest.java | 19 import static android.os.BatteryStats.STATS_SINCE_CHARGED; 100 assertNull(u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes() 101 assertNull(u.getScreenOffCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes() 113 u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes() 115 assertNull(u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes() 117 assertNull(u.getScreenOffCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes() 144 u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes() 146 assertNull(u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes() 148 assertNull(u.getScreenOffCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes() 176 u.getCpuFreqTimes(STATS_SINCE_CHARGED, procState)); in testUpdateProcStateCpuTimes() [all …]
|
D | BatteryStatsSensorTest.java | 63 assertEquals(2, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop() 65 clocks.realtime * 1000, BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop() 67 assertEquals(1, sensorBgTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop() 69 clocks.realtime * 1000, BatteryStats.STATS_SINCE_CHARGED)); in testSensorStartStop() 92 sensorTimer.getTotalTimeLocked(curr, BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery() 93 assertEquals(0, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery() 104 sensorTimer.getTotalTimeLocked(curr, BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery() 105 assertEquals(0, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOffBattery() 127 sensorTimer.getTotalTimeLocked(curr, BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOnBattery() 128 assertEquals(1, sensorTimer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCountingWhileOnBattery() [all …]
|
D | BatteryStatsNoteTest.java | 19 import static android.os.BatteryStats.STATS_SINCE_CHARGED; 69 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked() 72 assertEquals(0, bgCntr.getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked() 79 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked() 82 .getCountLocked(STATS_SINCE_CHARGED)); in testNoteBluetoothScanResultLocked() 109 long actualTime = aggregTimer.getTotalTimeLocked(300_000, STATS_SINCE_CHARGED); in testNoteStartWakeLocked() 110 long bgTime = aggregTimer.getSubTimer().getTotalTimeLocked(300_000, STATS_SINCE_CHARGED); in testNoteStartWakeLocked() 157 STATS_SINCE_CHARGED); in testNoteUidProcessStateLocked() 162 elapsedTimeUs, STATS_SINCE_CHARGED); in testNoteUidProcessStateLocked() 167 elapsedTimeUs, STATS_SINCE_CHARGED); in testNoteUidProcessStateLocked() [all …]
|
D | BatteryStatsBackgroundStatsTest.java | 19 import static android.os.BatteryStats.STATS_SINCE_CHARGED; 52 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase() 59 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase() 66 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase() 74 assertEquals(0, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase() 81 assertEquals(106_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase() 88 assertEquals(114_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase() 96 assertEquals(227_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase() 103 assertEquals(227_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testBgTimeBase() 152 assertEquals(150_000, bgtb.computeRealtime(cur, STATS_SINCE_CHARGED)); in testScreenOffBgTimeBase() [all …]
|
D | LongSamplingCounterTest.java | 19 import static android.os.BatteryStats.STATS_SINCE_CHARGED; 121 assertEquals(111, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testAddCountLocked() 123 assertEquals(333, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testAddCountLocked() 127 assertEquals(333, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testAddCountLocked() 130 assertEquals(777, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testAddCountLocked() 132 assertEquals(777, mCounter.getCountLocked(STATS_SINCE_CHARGED)); in testAddCountLocked() 162 return mCounter.getCountLocked(STATS_SINCE_CHARGED); in getCount()
|
D | BatteryStatsCpuTimesTest.java | 19 import static android.os.BatteryStats.STATS_SINCE_CHARGED; 240 u.getTimeAtCpuSpeed(cluster, speed, STATS_SINCE_CHARGED)); in testUpdateClusterSpeedTimes() 279 uidTimesUs[i][0], u.getUserCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked() 281 uidTimesUs[i][1], u.getSystemCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked() 313 uidTimesUs[i][0] + deltasUs[i][0], u.getUserCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked() 315 uidTimesUs[i][1] + deltasUs[i][1], u.getSystemCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked() 357 uidTimesUs[i][0], u.getUserCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked_isolatedUid() 359 uidTimesUs[i][1], u.getSystemCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked_isolatedUid() 402 expectedUserTimeUs, u.getUserCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked_isolatedUid() 404 expectedSystemTimeUs, u.getSystemCpuTimeUs(STATS_SINCE_CHARGED)); in testReadKernelUidCpuTimesLocked_isolatedUid() [all …]
|
D | LongSamplingCounterArrayTest.java | 19 import static android.os.BatteryStats.STATS_SINCE_CHARGED; 124 assertArrayEquals(COUNTS, mCounterArray.getCountsLocked(STATS_SINCE_CHARGED)); in testGetCountsLocked() 127 assertArrayEquals(COUNTS, mCounterArray.getCountsLocked(STATS_SINCE_CHARGED)); in testGetCountsLocked()
|
D | BatteryStatsServTest.java | 446 Assert.assertEquals(8085, serv.getLaunches(BatteryStats.STATS_SINCE_CHARGED)); in testGetLaunches() 472 serv.getStartTime(20000, BatteryStats.STATS_SINCE_CHARGED)); in testGetStartTimeRunning() 498 serv.getStartTime(20000, BatteryStats.STATS_SINCE_CHARGED)); in testGetStartTimeNotRunning() 521 Assert.assertEquals(4042, serv.getStarts(BatteryStats.STATS_SINCE_CHARGED)); in testGetStarts()
|
D | BatteryStatsTimeBaseTest.java | 284 tb.computeUptime(666, BatteryStats.STATS_SINCE_CHARGED)); in testComputeUptime() 297 tb.computeRealtime(6666, BatteryStats.STATS_SINCE_CHARGED)); in testComputeRealtime()
|
D | BatteryStatsTimerTest.java | 263 timer.getTotalTimeLocked(66, BatteryStats.STATS_SINCE_CHARGED)); in testGetTotalTimeLocked() 285 Assert.assertEquals(10000, timer.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testGetCountLocked()
|
D | BatteryStatsHelperTest.java | 257 BatteryStats.STATS_SINCE_CHARGED); in testGetProcessForegroundTimeMs_largerActivityTime_returnMinTime()
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | HealthStatsBatteryStatsWriter.java | 20 import static android.os.BatteryStats.STATS_SINCE_CHARGED; 66 bs.computeBatteryRealtime(mNowRealtimeMs*1000, STATS_SINCE_CHARGED)/1000); in writeUid() 70 bs.computeBatteryUptime(mNowUptimeMs*1000, STATS_SINCE_CHARGED)/1000); in writeUid() 75 mNowRealtimeMs*1000, STATS_SINCE_CHARGED)/1000); in writeUid() 79 bs.computeBatteryScreenOffUptime(mNowUptimeMs*1000, STATS_SINCE_CHARGED)/1000); in writeUid() 164 controller.getIdleTimeCounter().getCountLocked(STATS_SINCE_CHARGED)); in writeUid() 167 controller.getRxTimeCounter().getCountLocked(STATS_SINCE_CHARGED)); in writeUid() 171 sum += counter.getCountLocked(STATS_SINCE_CHARGED); in writeUid() 176 controller.getPowerCounter().getCountLocked(STATS_SINCE_CHARGED)); in writeUid() 183 controller.getIdleTimeCounter().getCountLocked(STATS_SINCE_CHARGED)); in writeUid() [all …]
|
/frameworks/base/core/java/com/android/internal/os/ |
D | BatteryStatsHelper.java | 110 private int mStatsType = BatteryStats.STATS_SINCE_CHARGED; 371 if (statsType != BatteryStats.STATS_SINCE_CHARGED) { in refreshStats() 924 BatteryStats.STATS_SINCE_CHARGED); in smearScreenBatterySipper() 1006 return timer.getTotalTimeLocked(rawRealtimeUs, BatteryStats.STATS_SINCE_CHARGED); in getForegroundActivityTotalTimeUs()
|
D | BatteryStatsImpl.java | 1301 out.writeLong(computeUptime(uptime, STATS_SINCE_CHARGED)); in writeSummaryToParcel() 1302 out.writeLong(computeRealtime(realtime, STATS_SINCE_CHARGED)); in writeSummaryToParcel() 6236 final int which = STATS_SINCE_CHARGED; in getGpsBatteryDrainMaMs() 6797 return mCpuActiveTimeMs.getCountLocked(STATS_SINCE_CHARGED); in getCpuActiveTime() 6802 return nullIfAllZeros(mCpuClusterTimesMs, STATS_SINCE_CHARGED); in getCpuClusterTimes() 12595 final int which = STATS_SINCE_CHARGED; in getCellularBatteryStats() 12641 final int which = STATS_SINCE_CHARGED; in getWifiBatteryStats() 12694 final int which = STATS_SINCE_CHARGED; in getGpsBatteryStats() 12785 int dischargeAmount = which == STATS_SINCE_CHARGED in getDischargeAmount() 13196 pw.print(uid.getUserCpuTimeUs(STATS_SINCE_CHARGED) / 1000); pw.print(" "); in dumpCpuStatsLocked() [all …]
|
/frameworks/base/core/java/android/os/ |
D | BatteryStats.java | 204 public static final int STATS_SINCE_CHARGED = 0; field in BatteryStats 3719 if (which != BatteryStats.STATS_SINCE_CHARGED) { in dumpCheckinLocked() 3766 which == STATS_SINCE_CHARGED ? getStartCount() : "N/A", in dumpCheckinLocked() 4493 if (which != BatteryStats.STATS_SINCE_CHARGED) { in dumpLocked() 5541 computeBatteryRealtime(rawRealtime, STATS_SINCE_CHARGED))); in dumpLocked() argument 5548 computeBatteryRealtime(rawRealtime, STATS_SINCE_CHARGED))); in dumpLocked() argument 6091 numExcessive = which == STATS_SINCE_CHARGED in dumpLocked() 7154 dumpLocked(context, pw, "", STATS_SINCE_CHARGED, reqUid, in dumpLocked() 7245 dumpCheckinLocked(context, pw, STATS_SINCE_CHARGED, -1, in dumpCheckinLocked() 7277 helper.refreshStats(STATS_SINCE_CHARGED, UserHandle.USER_ALL); in dumpProtoLocked() [all …]
|
/frameworks/base/services/core/java/com/android/server/stats/ |
D | StatsCompanionService.java | 1763 mBatteryStatsHelper.refreshStats(BatteryStats.STATS_SINCE_CHARGED, UserHandle.USER_ALL); in getBatteryStatsHelper()
|
/frameworks/base/config/ |
D | hiddenapi-greylist-max-o.txt | 49197 Landroid/os/BatteryStats;->STATS_SINCE_CHARGED:I
|