Home
last modified time | relevance | path

Searched refs:mBatteryStats (Results 1 – 25 of 28) sorted by relevance

12

/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiLockManagerTest.java53 @Mock IBatteryStats mBatteryStats; field in WifiLockManagerTest
66 mWifiLockManager = new WifiLockManager(mContext, mBatteryStats); in setUp()
77 InOrder inOrder = inOrder(binder, mBatteryStats); in acquireWifiLockSuccessful()
79 inOrder.verify(mBatteryStats).noteFullWifiLockAcquiredFromSource(ws); in acquireWifiLockSuccessful()
87 InOrder inOrder = inOrder(binder, mBatteryStats); in releaseWifiLockSuccessful()
89 inOrder.verify(mBatteryStats).noteFullWifiLockReleasedFromSource(any(WorkSource.class)); in releaseWifiLockSuccessful()
241 InOrder inOrder = inOrder(mBatteryStats); in testUpdateWifiLockWorkSourceCalledWithWorkSource()
242 inOrder.verify(mBatteryStats).noteFullWifiLockReleasedFromSource(mWorkSource); in testUpdateWifiLockWorkSourceCalledWithWorkSource()
243 inOrder.verify(mBatteryStats).noteFullWifiLockAcquiredFromSource(eq(newWorkSource)); in testUpdateWifiLockWorkSourceCalledWithWorkSource()
260 InOrder inOrder = inOrder(mBatteryStats); in testUpdateWifiLockWorkSourceCalledWithUID()
[all …]
DWifiMulticastLockManagerTest.java41 @Mock IBatteryStats mBatteryStats; field in WifiMulticastLockManagerTest
50 mManager = new WifiMulticastLockManager(mHandler, mBatteryStats); in setUp()
74 verify(mBatteryStats).noteWifiMulticastEnabled(anyInt()); in oneLock()
75 verify(mBatteryStats, times(0)).noteWifiMulticastDisabled(anyInt()); in oneLock()
78 verify(mBatteryStats).noteWifiMulticastDisabled(anyInt()); in oneLock()
DWifiStateTrackerTest.java40 @Mock IBatteryStats mBatteryStats; field in WifiStateTrackerTest
49 mWifiStateTracker = new WifiStateTracker(mBatteryStats); in setUp()
64 verify(mBatteryStats, times(relevantStates.length)).noteWifiState(anyInt(), any()); in testBatteryStatsUpdated()
78 verify(mBatteryStats, times(0)).noteWifiState(anyInt(), any()); in testBatteryStatsNotUpdated()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DBatteryInfoTest.java55 private BatteryStats mBatteryStats; field in BatteryInfoTest
88 doReturn(REMAINING_TIME_NULL).when(mBatteryStats).computeBatteryTimeRemaining(anyLong()); in testGetBatteryInfo_hasStatusLabel()
90 mBatteryStats, SystemClock.elapsedRealtime() * 1000, true); in testGetBatteryInfo_hasStatusLabel()
97 doReturn(REMAINING_TIME).when(mBatteryStats).computeChargeTimeRemaining(anyLong()); in testGetBatteryInfo_doNotShowChargingMethod_hasRemainingTime()
99 mBatteryStats, SystemClock.elapsedRealtime() * 1000, false); in testGetBatteryInfo_doNotShowChargingMethod_hasRemainingTime()
106 doReturn(REMAINING_TIME_NULL).when(mBatteryStats).computeChargeTimeRemaining(anyLong()); in testGetBatteryInfo_doNotShowChargingMethod_noRemainingTime()
108 mBatteryStats, SystemClock.elapsedRealtime() * 1000, false); in testGetBatteryInfo_doNotShowChargingMethod_noRemainingTime()
116 mBatteryStats, SystemClock.elapsedRealtime() * 1000, true); in testGetBatteryInfo_pluggedIn_dischargingFalse()
/frameworks/base/core/java/android/os/health/
DSystemHealthManager.java46 private final IBatteryStats mBatteryStats; field in SystemHealthManager
58 mBatteryStats = batteryStats; in SystemHealthManager()
87 final HealthStatsParceler parceler = mBatteryStats.takeUidSnapshot(uid); in takeUidSnapshot()
122 final HealthStatsParceler[] parcelers = mBatteryStats.takeUidSnapshots(uids); in takeUidSnapshots()
/frameworks/base/services/core/java/com/android/server/power/
DNotifier.java90 private final IBatteryStats mBatteryStats; field in Notifier
136 mBatteryStats = batteryStats; in Notifier()
164 mBatteryStats.noteInteractive(true); in Notifier()
186 mBatteryStats.noteStartWakelockFromSource(workSource, ownerPid, tag, in onWakeLockAcquired()
189 mBatteryStats.noteStartWakelock(ownerUid, ownerPid, tag, historyTag, in onWakeLockAcquired()
212 mBatteryStats.noteLongPartialWakelockStart(tag, historyTag, workSource.get(i)); in onLongPartialWakeLockStart()
215 mBatteryStats.noteLongPartialWakelockStart(tag, historyTag, ownerUid); in onLongPartialWakeLockStart()
233 mBatteryStats.noteLongPartialWakelockFinish(tag, historyTag, workSource.get(i)); in onLongPartialWakeLockFinish()
236 mBatteryStats.noteLongPartialWakelockFinish(tag, historyTag, ownerUid); in onLongPartialWakeLockFinish()
265 mBatteryStats.noteChangeWakelockFromSource(workSource, ownerPid, tag, historyTag, in onWakeLockChanging()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiStateTracker.java37 private IBatteryStats mBatteryStats; field in WifiStateTracker
41 mBatteryStats = stats; in WifiStateTracker()
46 mBatteryStats.noteWifiState(state, null); in informWifiStateBatteryStats()
DWifiLockManager.java41 private final IBatteryStats mBatteryStats; field in WifiLockManager
54 mBatteryStats = batteryStats; in WifiLockManager()
156 mBatteryStats.noteFullWifiLockReleasedFromSource(wl.mWorkSource); in updateWifiLockWorkSource()
158 mBatteryStats.noteFullWifiLockAcquiredFromSource(wl.mWorkSource); in updateWifiLockWorkSource()
191 mBatteryStats.noteFullWifiLockAcquiredFromSource(lock.mWorkSource); in addLock()
233 mBatteryStats.noteFullWifiLockReleasedFromSource(wifiLock.mWorkSource); in releaseLock()
DWifiMulticastLockManager.java42 private final IBatteryStats mBatteryStats; field in WifiMulticastLockManager
55 mBatteryStats = batteryStats; in WifiMulticastLockManager()
148 mBatteryStats.noteWifiMulticastEnabled(uid); in acquireLock()
182 mBatteryStats.noteWifiMulticastDisabled(uid); in removeMulticasterLocked()
DSupplicantStateTracker.java52 private final IBatteryStats mBatteryStats; field in SupplicantStateTracker
106 mBatteryStats = mFacade.getBatteryService(); in SupplicantStateTracker()
210 mBatteryStats.noteWifiSupplicantStateChanged(supplState, failedAuth); in sendSupplicantStateChangedBroadcast()
DWifiInjector.java122 private final IBatteryStats mBatteryStats; field in WifiInjector
154 mBatteryStats = IBatteryStats.Stub.asInterface(mFrameworkFacade.getService( in WifiInjector()
156 mWifiStateTracker = new WifiStateTracker(mBatteryStats); in WifiInjector()
DWifiStateMachine.java861 private final IBatteryStats mBatteryStats; field in WifiStateMachine
890 mBatteryStats = IBatteryStats.Stub.asInterface(mFacade.getService( in WifiStateMachine()
2109 mBatteryStats.noteWifiRunningChanged(mLastRunningWifiUids, in updateBatteryWorkSource()
2115 mBatteryStats.noteWifiRunning(mRunningWifiUids); in updateBatteryWorkSource()
2122 mBatteryStats.noteWifiStopped(mLastRunningWifiUids); in updateBatteryWorkSource()
2790 mBatteryStats.noteWifiOn(); in setWifiState()
2792 mBatteryStats.noteWifiOff(); in setWifiState()
2814 mBatteryStats.noteWifiOn(); in setWifiApState()
2816 mBatteryStats.noteWifiOff(); in setWifiApState()
3056 mBatteryStats.noteWifiRssiChanged(newRssi); in sendRssiChangeBroadcast()
/frameworks/base/core/java/android/os/
DBatteryManager.java219 private final IBatteryStats mBatteryStats; field in BatteryManager
226 mBatteryStats = IBatteryStats.Stub.asInterface( in BatteryManager()
235 mBatteryStats = batteryStats; in BatteryManager()
247 return mBatteryStats.isCharging(); in isCharging()
/frameworks/base/services/core/java/com/android/server/connectivity/
DDataConnectionStats.java41 private final IBatteryStats mBatteryStats; field in DataConnectionStats
50 mBatteryStats = BatteryStatsService.getService(); in DataConnectionStats()
94 mBatteryStats.notePhoneDataConnectionState(networkType, visible); in notePhoneDataConnectionState()
/frameworks/base/services/core/java/com/android/server/job/
DJobServiceContext.java97 private final IBatteryStats mBatteryStats; field in JobServiceContext
177 mBatteryStats = batteryStats; in JobServiceContext()
241 mBatteryStats.noteJobStart(job.getBatteryName(), job.getSourceUid()); in executeRunnableJob()
709 mBatteryStats.noteJobFinish(mRunningJob.getBatteryName(), in closeAndCleanupJobLocked()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/scanner/
DWifiScanningServiceTest.java93 @Mock IBatteryStats mBatteryStats; field in WifiScanningServiceTest
130 mWifiScannerImplFactory, mBatteryStats, mWifiInjector); in setUp()
405 mWifiScannerImplFactory, mBatteryStats); in construct()
524 verify(mBatteryStats).noteWifiScanStartedFromSource(eq(workSource)); in doSuccessfulSingleScan()
539 verify(mBatteryStats).noteWifiScanStoppedFromSource(eq(workSource)); in doSuccessfulSingleScan()
636 verifyNoMoreInteractions(mBatteryStats); in sendSingleScanRequestWhichFailsToStart()
672 verify(mBatteryStats).noteWifiScanStartedFromSource(eq(workSource)); in sendSingleScanRequestWhichFailsAfterStart()
683 verify(mBatteryStats).noteWifiScanStoppedFromSource(eq(workSource)); in sendSingleScanRequestWhichFailsAfterStart()
968 verify(mBatteryStats).noteWifiScanStartedFromSource(eq(workSource1)); in sendMultipleSingleScanRequestWhilePreviousScanRunning()
991 verify(mBatteryStats).noteWifiScanStoppedFromSource(eq(workSource1)); in sendMultipleSingleScanRequestWhilePreviousScanRunning()
[all …]
/frameworks/base/services/core/java/com/android/server/display/
DDisplayPowerController.java129 private final IBatteryStats mBatteryStats; field in DisplayPowerController
286 mBatteryStats = BatteryStatsService.getService(); in DisplayPowerController()
518 mBatteryStats.noteScreenState(mPowerState.getScreenState()); in initialize()
519 mBatteryStats.noteScreenBrightness(mPowerState.getScreenBrightness()); in initialize()
902 mBatteryStats.noteScreenState(state);
953 mBatteryStats.noteScreenBrightness(target);
/frameworks/base/services/core/java/com/android/server/am/
DProcessRecord.java58 private final BatteryStatsImpl mBatteryStats; // where to collect runtime statistics field in ProcessRecord
345 synchronized (mBatteryStats) { in dump()
346 wtime = mBatteryStats.getProcessWakeTime(info.uid, in dump()
439 mBatteryStats = _batteryStats; in ProcessRecord()
/frameworks/base/services/core/java/com/android/server/
DTelephonyRegistry.java132 private final IBatteryStats mBatteryStats; field in TelephonyRegistry
297 mBatteryStats = BatteryStatsService.getService(); in TelephonyRegistry()
1457 mBatteryStats.notePhoneState(state.getState()); in broadcastServiceStateChanged()
1479 mBatteryStats.notePhoneSignalStrength(signalStrength); in broadcastSignalStrengthChanged()
1506 mBatteryStats.notePhoneOff(); in broadcastCallStateChanged()
1508 mBatteryStats.notePhoneOn(); in broadcastCallStateChanged()
DBatteryService.java114 private final IBatteryStats mBatteryStats; field in BatteryService
165 mBatteryStats = BatteryStatsService.getService(); in BatteryService()
370 mBatteryStats.setBatteryState(mBatteryProps.batteryStatus, mBatteryProps.batteryHealth, in processValuesLocked()
DDeviceIdleController.java118 private IBatteryStats mBatteryStats; field in DeviceIdleController
1049 mBatteryStats.noteDeviceIdleMode(msg.what == MSG_REPORT_IDLE_ON in handleMessage()
1070 mBatteryStats.noteDeviceIdleMode(BatteryStats.DEVICE_IDLE_MODE_OFF, in handleMessage()
1099 mBatteryStats.noteDeviceIdleMode(BatteryStats.DEVICE_IDLE_MODE_OFF, in handleMessage()
1399 mBatteryStats = BatteryStatsService.getService(); in onBootPhase()
1726 mBatteryStats.noteEvent(BatteryStats.HistoryItem.EVENT_TEMP_WHITELIST_START, in addPowerSaveTempWhitelistAppDirectInternal()
1783 mBatteryStats.noteEvent(BatteryStats.HistoryItem.EVENT_TEMP_WHITELIST_FINISH, in checkTempAppWhitelistTimeout()
DNetworkManagementService.java219 private IBatteryStats mBatteryStats; field in NetworkManagementService
377 if (mBatteryStats != null) { in getBatteryStats()
378 return mBatteryStats; in getBatteryStats()
380 mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService( in getBatteryStats()
382 return mBatteryStats; in getBatteryStats()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/
DWifiScanningServiceImpl.java270 private final IBatteryStats mBatteryStats; field in WifiScanningServiceImpl
282 mBatteryStats = batteryStats; in WifiScanningServiceImpl()
666 mBatteryStats.noteWifiScanStartedFromSource(mScanWorkSource); in enter()
676 mBatteryStats.noteWifiScanStoppedFromSource(mScanWorkSource); in exit()
1878 mBatteryStats.noteWifiBatchedScanStartedFromSource(mWorkSource, csph); in reportBatchedScanStart()
1889 mBatteryStats.noteWifiBatchedScanStoppedFromSource(mWorkSource); in reportBatchedScanStop()
/frameworks/base/services/usage/java/com/android/server/usage/
DUsageStatsService.java147 private IBatteryStats mBatteryStats; field in UsageStatsService
244 mBatteryStats = IBatteryStats.Stub.asInterface( in onBootPhase()
608 mBatteryStats.noteEvent(BatteryStats.HistoryItem.EVENT_PACKAGE_INACTIVE, in notifyBatteryStats()
611 mBatteryStats.noteEvent(BatteryStats.HistoryItem.EVENT_PACKAGE_ACTIVE, in notifyBatteryStats()
/frameworks/base/services/core/java/com/android/server/location/
DGnssLocationProvider.java406 private final IBatteryStats mBatteryStats; field in GnssLocationProvider
707 mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService( in GnssLocationProvider()
1298 mBatteryStats.noteStartGps(uid); in updateClientUids()
1316 mBatteryStats.noteStopGps(uid); in updateClientUids()

12