Home
last modified time | relevance | path

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

12

/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiLockManagerTest.java52 @Mock IBatteryStats mBatteryStats; field in WifiLockManagerTest
72 mWifiLockManager = new WifiLockManager(mContext, mBatteryStats); in setUp()
83 InOrder inOrder = inOrder(binder, mBatteryStats); in acquireWifiLockSuccessful()
85 inOrder.verify(mBatteryStats).noteFullWifiLockAcquiredFromSource(ws); in acquireWifiLockSuccessful()
93 InOrder inOrder = inOrder(binder, mBatteryStats); in releaseWifiLockSuccessful()
95 inOrder.verify(mBatteryStats).noteFullWifiLockReleasedFromSource(any(WorkSource.class)); in releaseWifiLockSuccessful()
261 InOrder inOrder = inOrder(mBatteryStats); in smokeTestLockLifecycleWithChainedWorkSource()
262 inOrder.verify(mBatteryStats).noteFullWifiLockAcquiredFromSource(eq(updated)); in smokeTestLockLifecycleWithChainedWorkSource()
263 inOrder.verify(mBatteryStats).noteFullWifiLockReleasedFromSource(mChainedWorkSource); in smokeTestLockLifecycleWithChainedWorkSource()
282 InOrder inOrder = inOrder(mBatteryStats); in testUpdateWifiLockWorkSourceCalledWithWorkSource()
[all …]
DWifiMulticastLockManagerTest.java39 @Mock IBatteryStats mBatteryStats; field in WifiMulticastLockManagerTest
48 mManager = new WifiMulticastLockManager(mHandler, mBatteryStats); in setUp()
72 verify(mBatteryStats).noteWifiMulticastEnabled(anyInt()); in oneLock()
73 verify(mBatteryStats, times(0)).noteWifiMulticastDisabled(anyInt()); in oneLock()
76 verify(mBatteryStats).noteWifiMulticastDisabled(anyInt()); in oneLock()
DWifiStateMachinePrimeTest.java65 @Mock IBatteryStats mBatteryStats; field in WifiStateMachinePrimeTest
112 mBatteryStats); in createWifiStateMachinePrime()
167 verify(mBatteryStats).noteWifiOn(); in enterClientModeActiveState()
191 verify(mBatteryStats).noteWifiOn(); in enterScanOnlyModeActiveState()
192 verify(mBatteryStats).noteWifiState(eq(BatteryStats.WIFI_STATE_OFF_SCANNING), eq(null)); in enterScanOnlyModeActiveState()
216 verify(mBatteryStats).noteWifiOn(); in enterSoftApActiveMode()
254 reset(mBatteryStats); in testEnterSoftApModeFromDifferentState()
268 verify(mBatteryStats).noteWifiOff(); in testDisableWifiFromScanOnlyModeActiveState()
283 verify(mBatteryStats, never()).noteWifiOff(); in testDisableWifiFromSoftApModeActiveStateDoesNotStopSoftAp()
296 reset(mBatteryStats); in testSwitchModeWhenScanOnlyModeActiveState()
[all …]
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/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/core/java/android/os/
DBatteryManager.java248 private final IBatteryStats mBatteryStats; field in BatteryManager
256 mBatteryStats = IBatteryStats.Stub.asInterface( in BatteryManager()
267 mBatteryStats = batteryStats; in BatteryManager()
279 return mBatteryStats.isCharging(); in isCharging()
367 return mBatteryStats.computeChargeTimeRemaining(); in computeChargeTimeRemaining()
/frameworks/base/services/core/java/com/android/server/power/
DNotifier.java111 private final IBatteryStats mBatteryStats; field in Notifier
158 mBatteryStats = batteryStats; in Notifier()
188 mBatteryStats.noteInteractive(true); in Notifier()
210 mBatteryStats.noteStartWakelockFromSource(workSource, ownerPid, tag, in onWakeLockAcquired()
213 mBatteryStats.noteStartWakelock(ownerUid, ownerPid, tag, historyTag, in onWakeLockAcquired()
233 mBatteryStats.noteLongPartialWakelockStartFromSource(tag, historyTag, workSource); in onLongPartialWakeLockStart()
235 mBatteryStats.noteLongPartialWakelockStart(tag, historyTag, ownerUid); in onLongPartialWakeLockStart()
251 mBatteryStats.noteLongPartialWakelockFinishFromSource(tag, historyTag, workSource); in onLongPartialWakeLockFinish()
253 mBatteryStats.noteLongPartialWakelockFinish(tag, historyTag, ownerUid); in onLongPartialWakeLockFinish()
282 mBatteryStats.noteChangeWakelockFromSource(workSource, ownerPid, tag, historyTag, in onWakeLockChanging()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiStateTracker.java39 private IBatteryStats mBatteryStats; field in WifiStateTracker
43 mBatteryStats = stats; in WifiStateTracker()
48 mBatteryStats.noteWifiState(state, null); in informWifiStateBatteryStats()
DWifiLockManager.java41 private final IBatteryStats mBatteryStats; field in WifiLockManager
54 mBatteryStats = batteryStats; in WifiLockManager()
164 mBatteryStats.noteFullWifiLockAcquiredFromSource(newWorkSource); in updateWifiLockWorkSource()
165 mBatteryStats.noteFullWifiLockReleasedFromSource(wl.mWorkSource); in updateWifiLockWorkSource()
200 mBatteryStats.noteFullWifiLockAcquiredFromSource(lock.mWorkSource); in addLock()
242 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()
DWifiPowerMetrics.java39 private final IBatteryStats mBatteryStats; field in WifiPowerMetrics
42 mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService( in WifiPowerMetrics()
89 return mBatteryStats.getWifiBatteryStats(); in getStats()
DWifiStateMachinePrime.java61 private final IBatteryStats mBatteryStats; field in WifiStateMachinePrime
141 mBatteryStats = batteryStats; in WifiStateMachinePrime()
577 mBatteryStats.noteWifiOn(); in updateBatteryStatsWifiState()
582 mBatteryStats.noteWifiOff(); in updateBatteryStatsWifiState()
592 mBatteryStats.noteWifiState(BatteryStats.WIFI_STATE_OFF_SCANNING, null); in updateBatteryStatsScanModeActive()
DSupplicantStateTracker.java52 private final IBatteryStats mBatteryStats; field in SupplicantStateTracker
106 mBatteryStats = mFacade.getBatteryService(); in SupplicantStateTracker()
210 mBatteryStats.noteWifiSupplicantStateChanged(supplState, failedAuth); in sendSupplicantStateChangedBroadcast()
DWifiInjector.java133 private final IBatteryStats mBatteryStats; field in WifiInjector
169 mBatteryStats = IBatteryStats.Stub.asInterface(mFrameworkFacade.getService( in WifiInjector()
171 mWifiStateTracker = new WifiStateTracker(mBatteryStats); in WifiInjector()
271 mBatteryStats); in WifiInjector()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/
DModemPowerMetrics.java34 private final IBatteryStats mBatteryStats; field in ModemPowerMetrics
37 mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService( in ModemPowerMetrics()
76 return mBatteryStats.getCellularBatteryStats(); in getStats()
/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/location/java/com/android/internal/location/gnssmetrics/
DGnssMetrics.java324 private final IBatteryStats mBatteryStats; field in GnssMetrics.GnssPowerMetrics
330 mBatteryStats = stats; in GnssPowerMetrics()
361 return mBatteryStats.getGpsBatteryStats(); in getGpsBatteryStats()
385 mBatteryStats.noteGpsSignalQuality(getSignalLevel(avgCn0)); in reportSignalQuality()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/scanner/
DWifiScanningServiceTest.java119 @Mock IBatteryStats mBatteryStats; field in WifiScanningServiceTest
157 mWifiScannerImplFactory, mBatteryStats, mWifiInjector); in setUp()
453 mWifiScannerImplFactory, mBatteryStats); in construct()
605 verify(mBatteryStats).noteWifiScanStartedFromSource(eq(workSource)); in doSuccessfulSingleScan()
615 verify(mBatteryStats).noteWifiScanStoppedFromSource(eq(workSource)); in doSuccessfulSingleScan()
726 verify(mBatteryStats, never()).noteWifiScanStoppedFromSource(eq(workSource)); in sendSingleScanRequestWithPrivilegedTypeParamsSetFromNonPrivilegedApp()
778 verify(mBatteryStats, never()).noteWifiScanStoppedFromSource(eq(workSource)); in sendSingleScanRequestWithPrivilegedHiddenNetworkParamsSetFromNonPrivilegedApp()
823 verify(mBatteryStats, never()).noteWifiScanStoppedFromSource(eq(workSource)); in sendSingleScanRequestWithInvalidScanType()
873 verifyNoMoreInteractions(mBatteryStats); in sendSingleScanRequestWhichFailsToStart()
909 verify(mBatteryStats).noteWifiScanStartedFromSource(eq(workSource)); in sendSingleScanRequestWhichFailsAfterStart()
[all …]
/frameworks/base/services/core/java/com/android/server/job/
DJobServiceContext.java104 private final IBatteryStats mBatteryStats; field in JobServiceContext
184 mBatteryStats = batteryStats; in JobServiceContext()
267 mBatteryStats.noteJobStart(job.getBatteryName(), job.getSourceUid()); in executeRunnableJob()
775 mBatteryStats.noteJobFinish(mRunningJob.getBatteryName(), in closeAndCleanupJobLocked()
/frameworks/base/services/core/java/com/android/server/display/
DDisplayPowerController.java142 private final IBatteryStats mBatteryStats; field in DisplayPowerController
376 mBatteryStats = BatteryStatsService.getService(); in DisplayPowerController()
622 mBatteryStats.noteScreenState(mPowerState.getScreenState()); in initialize()
623 mBatteryStats.noteScreenBrightness(mPowerState.getScreenBrightness()); in initialize()
1117 mBatteryStats.noteScreenState(state);
1180 mBatteryStats.noteScreenBrightness(target);
/frameworks/base/services/core/java/com/android/server/
DTelephonyRegistry.java146 private final IBatteryStats mBatteryStats; field in TelephonyRegistry
320 mBatteryStats = BatteryStatsService.getService(); in TelephonyRegistry()
1514 mBatteryStats.notePhoneState(state.getState()); in broadcastServiceStateChanged()
1536 mBatteryStats.notePhoneSignalStrength(signalStrength); in broadcastSignalStrengthChanged()
1563 mBatteryStats.notePhoneOff(); in broadcastCallStateChanged()
1565 mBatteryStats.notePhoneOn(); in broadcastCallStateChanged()
DDeviceIdleController.java119 private IBatteryStats mBatteryStats; field in DeviceIdleController
1059 mBatteryStats.noteDeviceIdleMode(msg.what == MSG_REPORT_IDLE_ON in handleMessage()
1080 mBatteryStats.noteDeviceIdleMode(BatteryStats.DEVICE_IDLE_MODE_OFF, in handleMessage()
1109 mBatteryStats.noteDeviceIdleMode(BatteryStats.DEVICE_IDLE_MODE_OFF, in handleMessage()
1462 mBatteryStats = BatteryStatsService.getService(); in onBootPhase()
1869 mBatteryStats.noteEvent(BatteryStats.HistoryItem.EVENT_TEMP_WHITELIST_START, in addPowerSaveTempWhitelistAppDirectInternal()
1957 mBatteryStats.noteEvent(BatteryStats.HistoryItem.EVENT_TEMP_WHITELIST_FINISH, in onAppRemovedFromTempWhitelistLocked()
DNetworkManagementService.java239 private IBatteryStats mBatteryStats; field in NetworkManagementService
411 if (mBatteryStats != null) { in getBatteryStats()
412 return mBatteryStats; in getBatteryStats()
414 mBatteryStats = in getBatteryStats()
416 return mBatteryStats; in getBatteryStats()
DBatteryService.java139 private final IBatteryStats mBatteryStats; field in BatteryService
201 mBatteryStats = BatteryStatsService.getService(); in BatteryService()
461 mBatteryStats.setBatteryState(mHealthInfo.batteryStatus, mHealthInfo.batteryHealth, in processValuesLocked()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/
DWifiScanningServiceImpl.java271 private final IBatteryStats mBatteryStats; field in WifiScanningServiceImpl
283 mBatteryStats = batteryStats; in WifiScanningServiceImpl()
672 mBatteryStats.noteWifiScanStartedFromSource(mScanWorkSource); in enter()
682 mBatteryStats.noteWifiScanStoppedFromSource(mScanWorkSource); in exit()
1856 mBatteryStats.noteWifiBatchedScanStartedFromSource(mWorkSource, csph); in reportBatchedScanStart()
1868 mBatteryStats.noteWifiBatchedScanStoppedFromSource(mWorkSource); in reportBatchedScanStop()

12