Home
last modified time | relevance | path

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

/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DWifiStateTrackerTest.java43 @Mock BatteryStatsManager mBatteryStats; field in WifiStateTrackerTest
52 mWifiStateTracker = new WifiStateTracker(mBatteryStats); in setUp()
70 verify(mBatteryStats, times(relevantStates.length)).reportWifiState(anyInt(), any()); in testBatteryStatsUpdated()
86 verify(mBatteryStats, times(0)).reportWifiState(anyInt(), any()); in testBatteryStatsNotUpdated()
92 verify(mBatteryStats, never()).reportWifiState(anyInt(), any()); in updateOnMultipleIfaces()
95 verify(mBatteryStats).reportWifiState( in updateOnMultipleIfaces()
99 verify(mBatteryStats).reportWifiState( in updateOnMultipleIfaces()
103 verify(mBatteryStats).reportWifiState( in updateOnMultipleIfaces()
107 verify(mBatteryStats).reportWifiState( in updateOnMultipleIfaces()
111 verify(mBatteryStats).reportWifiState( in updateOnMultipleIfaces()
[all …]
DWifiMulticastLockManagerTest.java57 @Mock BatteryStatsManager mBatteryStats; field in WifiMulticastLockManagerTest
78 mManager = new WifiMulticastLockManager(mActiveModeWarden, mBatteryStats); in setUp()
106 verify(mBatteryStats).reportWifiMulticastEnabled(wsCaptor.capture()); in oneLock()
109 verify(mBatteryStats, times(0)).reportWifiMulticastDisabled(any()); in oneLock()
112 verify(mBatteryStats).reportWifiMulticastDisabled(wsCaptor.capture()); in oneLock()
190 verify(mBatteryStats).reportWifiMulticastEnabled(any()); in oneLock_wrongName()
191 verify(mBatteryStats, never()).reportWifiMulticastDisabled(any()); in oneLock_wrongName()
194 verify(mBatteryStats, never()).reportWifiMulticastDisabled(any()); in oneLock_wrongName()
206 InOrder inOrderBatteryStats = inOrder(mBatteryStats); in multipleLocksInOrder()
210 inOrderBatteryStats.verify(mBatteryStats).reportWifiMulticastEnabled(any()); in multipleLocksInOrder()
[all …]
DWifiPowerMetricsTest.java44 BatteryStatsManager mBatteryStats; field in WifiPowerMetricsTest
52 mWifiPowerMetrics = new WifiPowerMetrics(mBatteryStats); in setUp()
67 when(mBatteryStats.getWifiBatteryStats()).thenReturn(wifiBatteryStats); in testBuildWifiRadioUsageProto()
69 verify(mBatteryStats).getWifiBatteryStats(); in testBuildWifiRadioUsageProto()
83 when(mBatteryStats.getWifiBatteryStats()).thenReturn(null); in testBuildWifiRadioUsageProtoNull()
85 verify(mBatteryStats).getWifiBatteryStats(); in testBuildWifiRadioUsageProtoNull()
101 verify(mBatteryStats, atLeastOnce()).getWifiBatteryStats(); in testDumpCallsAppropriateMethods()
136 when(mBatteryStats.getWifiBatteryStats()).thenReturn(wifiBatteryStats); in testBuildProto()
138 verify(mBatteryStats).getWifiBatteryStats(); in testBuildProto()
169 when(mBatteryStats.getWifiBatteryStats()).thenReturn(null); in testBuildProtoNull()
[all …]
DWifiLockManagerTest.java73 @Mock BatteryStatsManager mBatteryStats; field in WifiLockManagerTest
114 mWifiLockManager = new WifiLockManager(mContext, mBatteryStats, in setUp()
130 InOrder inOrder = inOrder(binder, mBatteryStats); in acquireWifiLockSuccessful()
133 inOrder.verify(mBatteryStats).reportFullWifiLockAcquiredFromSource(ws); in acquireWifiLockSuccessful()
151 InOrder inOrder = inOrder(binder, mBatteryStats); in releaseWifiLockSuccessful()
153 inOrder.verify(mBatteryStats).reportFullWifiLockReleasedFromSource(any(WorkSource.class)); in releaseWifiLockSuccessful()
161 InOrder inOrder = inOrder(binder, mBatteryStats); in releaseWifiLockSuccessful_noBatteryStats()
170 InOrder inOrder = inOrder(binder, mBatteryStats); in releaseLowLatencyWifiLockSuccessful()
172 inOrder.verify(mBatteryStats).reportFullWifiLockReleasedFromSource(any(WorkSource.class)); in releaseLowLatencyWifiLockSuccessful()
333 InOrder inOrder = inOrder(mBatteryStats); in smokeTestLockLifecycleWithChainedWorkSource()
[all …]
DActiveModeWardenTest.java142 @Mock BatteryStatsManager mBatteryStats; field in ActiveModeWardenTest
271 mBatteryStats, in createActiveModeWarden()
334 verify(mBatteryStats).reportWifiOn(); in enterClientModeActiveState()
376 verify(mBatteryStats).reportWifiOn(); in enterScanOnlyModeActiveState()
378 verify(mBatteryStats).reportWifiState(BatteryStatsManager.WIFI_STATE_OFF_SCANNING, null); in enterScanOnlyModeActiveState()
412 verify(mBatteryStats).reportWifiOn(); in enterSoftApActiveMode()
638 reset(mBatteryStats, mScanRequestProxy); in testEnterSoftApModeFromDifferentState()
656 verify(mBatteryStats).reportWifiOff(); in testDisableWifiFromScanOnlyModeActiveState()
671 verify(mBatteryStats, never()).reportWifiOff(); in testDisableWifiFromSoftApModeActiveStateDoesNotStopSoftAp()
681 reset(mBatteryStats, mScanRequestProxy); in testSwitchModeWhenScanOnlyModeActiveState()
[all …]
DSupplicantStateTrackerTest.java58 private @Mock BatteryStatsManager mBatteryStats; field in SupplicantStateTrackerTest
78 mSupplicantStateTracker = new SupplicantStateTracker(mContext, mWcm, mBatteryStats, in setUp()
/packages/modules/Wifi/service/java/com/android/server/wifi/
DWifiMulticastLockManager.java43 private final BatteryStatsManager mBatteryStats; field in WifiMulticastLockManager
58 mBatteryStats = batteryStats; in WifiMulticastLockManager()
155 mBatteryStats.reportWifiMulticastEnabled(new WorkSource(uid)); in acquireLock()
191 mBatteryStats.reportWifiMulticastDisabled(new WorkSource(uid)); in removeMulticasterLocked()
DWifiPowerMetrics.java37 private final BatteryStatsManager mBatteryStats; field in WifiPowerMetrics
40 mBatteryStats = batteryStats; in WifiPowerMetrics()
129 return mBatteryStats.getWifiBatteryStats(); in getStats()
DWifiLockManager.java69 private final BatteryStatsManager mBatteryStats; field in WifiLockManager
100 mBatteryStats = batteryStats; in WifiLockManager()
796 mBatteryStats.reportFullWifiLockAcquiredFromSource(ws); in setBlameHiPerfWs()
802 mBatteryStats.reportFullWifiLockReleasedFromSource(ws); in setBlameHiPerfWs()
817 mBatteryStats.reportFullWifiLockAcquiredFromSource(new WorkSource(uid)); in setBlameLowLatencyUid()
822 mBatteryStats.reportFullWifiLockReleasedFromSource(new WorkSource(uid)); in setBlameLowLatencyUid()
DWifiInjector.java134 private final BatteryStatsManager mBatteryStats; field in WifiInjector
266 mBatteryStats = context.getSystemService(BatteryStatsManager.class); in WifiInjector()
278 mWifiStateTracker = new WifiStateTracker(mBatteryStats); in WifiInjector()
291 awareMetrics, rttMetrics, new WifiPowerMetrics(mBatteryStats), mWifiP2pMetrics, in WifiInjector()
437 mWifiNative, mDefaultClientModeManager, mBatteryStats, mWifiDiagnostics, in WifiInjector()
507 mLockManager = new WifiLockManager(mContext, mBatteryStats, mActiveModeWarden, in WifiInjector()
510 mWifiMulticastLockManager = new WifiMulticastLockManager(mActiveModeWarden, mBatteryStats); in WifiInjector()
725 mContext, mWifiConfigManager, mBatteryStats, mWifiHandlerThread.getLooper(), in makeClientModeImpl()
742 mBatteryStats, supplicantStateTracker, mMboOceController, mWifiCarrierInfoManager, in makeClientModeImpl()
/packages/apps/Bluetooth/src/com/android/bluetooth/gatt/
DAppScanStats.java64 mBatteryStats; field in AppScanStats
151 mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService("batterystats")); in AppScanStats()
169 mBatteryStats.noteBleScanResults(mWorkSource, 100); in addResult()
247 mBatteryStats.noteBleScanStarted(mWorkSource, isUnoptimized); in recordScanStart()
313 mBatteryStats.noteBleScanResults(mWorkSource, scan.results % 100); in recordScanStop()
314 mBatteryStats.noteBleScanStopped(mWorkSource, isUnoptimized); in recordScanStop()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/scanner/
DWifiScanningServiceTest.java143 @Mock BatteryStatsManager mBatteryStats; field in WifiScanningServiceTest
210 mWifiScannerImplFactory, mBatteryStats, mWifiInjector); in setUp()
513 mWifiScannerImplFactory, mBatteryStats); in construct()
686 verify(mBatteryStats).reportWifiScanStartedFromSource(eq(workSource)); in doSuccessfulSingleScanOnImpls()
707 verify(mBatteryStats).reportWifiScanStoppedFromSource(eq(workSource)); in doSuccessfulSingleScanOnImpls()
962 verify(mBatteryStats, never()).reportWifiScanStoppedFromSource(eq(workSource)); in sendSingleScanRequestWithPrivilegedTypeParamsSetFromNonPrivilegedApp()
1015 verify(mBatteryStats, never()).reportWifiScanStoppedFromSource(eq(workSource)); in sendSingleScanRequestWithPrivilegedHiddenNetworkParamsSetFromNonPrivilegedApp()
1060 verify(mBatteryStats, never()).reportWifiScanStoppedFromSource(eq(workSource)); in sendSingleScanRequestWithInvalidScanType()
1110 verifyNoMoreInteractions(mBatteryStats); in sendSingleScanRequestWhichFailsToStart()
1146 verify(mBatteryStats).reportWifiScanStartedFromSource(eq(workSource)); in sendSingleScanRequestWhichFailsAfterStart()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/scanner/
DWifiScanningServiceImpl.java409 private final BatteryStatsManager mBatteryStats; field in WifiScanningServiceImpl
426 mBatteryStats = batteryStats; in WifiScanningServiceImpl()
1043 mBatteryStats.reportWifiScanStartedFromSource(mScanWorkSource); in enter()
1054 mBatteryStats.reportWifiScanStoppedFromSource(mScanWorkSource); in exit()
2443 mBatteryStats.reportWifiBatchedScanStartedFromSource(mWorkSource, csph); in reportBatchedScanStart()
2451 mBatteryStats.reportWifiBatchedScanStoppedFromSource(mWorkSource); in reportBatchedScanStop()
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
DAdapterService.java263 private IBatteryStats mBatteryStats; field in AdapterService
534 mBatteryStats = IBatteryStats.Stub.asInterface( in onCreate()
661 mBatteryStats.noteResetBleScan(); in bringUpBle()