Home
last modified time | relevance | path

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

12

/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiMulticastLockManagerTest.java44 @Mock IBatteryStats mBatteryStats; field in WifiMulticastLockManagerTest
53 mManager = new WifiMulticastLockManager(mHandler, mBatteryStats); in setUp()
77 verify(mBatteryStats).noteWifiMulticastEnabled(anyInt()); in oneLock()
78 verify(mBatteryStats, times(0)).noteWifiMulticastDisabled(anyInt()); in oneLock()
81 verify(mBatteryStats).noteWifiMulticastDisabled(anyInt()); in oneLock()
96 verify(mBatteryStats).noteWifiMulticastEnabled(anyInt()); in oneLock_wrongName()
97 verify(mBatteryStats, never()).noteWifiMulticastDisabled(anyInt()); in oneLock_wrongName()
100 verify(mBatteryStats, never()).noteWifiMulticastDisabled(anyInt()); in oneLock_wrongName()
112 InOrder inOrderBatteryStats = inOrder(mBatteryStats); in multipleLocksInOrder()
116 inOrderBatteryStats.verify(mBatteryStats).noteWifiMulticastEnabled(anyInt()); in multipleLocksInOrder()
[all …]
DWifiPowerMetricsTest.java44 @Mock IBatteryStats 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()
99 doThrow(new RemoteException()).when(mBatteryStats).getWifiBatteryStats(); in testBuildWifiRadioUsageProtoRemoteException()
101 verify(mBatteryStats).getWifiBatteryStats(); in testBuildWifiRadioUsageProtoRemoteException()
117 verify(mBatteryStats, atLeastOnce()).getWifiBatteryStats(); in testDumpCallsAppropriateMethods()
132 when(mBatteryStats.getWifiBatteryStats()).thenReturn(wifiBatteryStats); in testBuildProto()
[all …]
DActiveModeWardenTest.java72 @Mock IBatteryStats mBatteryStats; field in ActiveModeWardenTest
127 mBatteryStats); in createActiveModeWarden()
186 verify(mBatteryStats).noteWifiOn(); in enterClientModeActiveState()
214 verify(mBatteryStats).noteWifiOn(); in enterScanOnlyModeActiveState()
215 verify(mBatteryStats).noteWifiState(eq(BatteryStats.WIFI_STATE_OFF_SCANNING), eq(null)); in enterScanOnlyModeActiveState()
239 verify(mBatteryStats).noteWifiOn(); in enterSoftApActiveMode()
280 reset(mBatteryStats, mScanRequestProxy); in testEnterSoftApModeFromDifferentState()
294 verify(mBatteryStats).noteWifiOff(); in testDisableWifiFromScanOnlyModeActiveState()
309 verify(mBatteryStats, never()).noteWifiOff(); in testDisableWifiFromSoftApModeActiveStateDoesNotStopSoftAp()
321 reset(mBatteryStats, mScanRequestProxy); 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()
DWifiLockManagerTest.java62 @Mock IBatteryStats mBatteryStats; field in WifiLockManagerTest
94 mWifiLockManager = new WifiLockManager(mContext, mBatteryStats, in setUp()
106 InOrder inOrder = inOrder(binder, mBatteryStats); in acquireWifiLockSuccessful()
110 inOrder.verify(mBatteryStats).noteFullWifiLockAcquired(DEFAULT_TEST_UID_1); in acquireWifiLockSuccessful()
112 inOrder.verify(mBatteryStats).noteFullWifiLockAcquiredFromSource(ws); in acquireWifiLockSuccessful()
131 InOrder inOrder = inOrder(binder, mBatteryStats); in releaseWifiLockSuccessful()
133 inOrder.verify(mBatteryStats).noteFullWifiLockReleasedFromSource(any(WorkSource.class)); in releaseWifiLockSuccessful()
141 InOrder inOrder = inOrder(binder, mBatteryStats); in releaseWifiLockSuccessful_noBatteryStats()
150 InOrder inOrder = inOrder(binder, mBatteryStats); in releaseLowLatencyWifiLockSuccessful()
152 inOrder.verify(mBatteryStats).noteFullWifiLockReleased(anyInt()); in releaseLowLatencyWifiLockSuccessful()
[all …]
/frameworks/base/core/java/android/os/
DBatteryManager.java256 private final IBatteryStats mBatteryStats; field in BatteryManager
264 mBatteryStats = IBatteryStats.Stub.asInterface( in BatteryManager()
275 mBatteryStats = batteryStats; in BatteryManager()
287 return mBatteryStats.isCharging(); in isCharging()
375 return mBatteryStats.computeChargeTimeRemaining(); in computeChargeTimeRemaining()
398 return mBatteryStats.setChargingStateUpdateDelayMillis(delayMillis); in setChargingStateUpdateDelayMillis()
/frameworks/base/core/java/android/os/health/
DSystemHealthManager.java50 private final IBatteryStats mBatteryStats; field in SystemHealthManager
63 mBatteryStats = batteryStats; in SystemHealthManager()
93 final HealthStatsParceler parceler = mBatteryStats.takeUidSnapshot(uid); in takeUidSnapshot()
128 final HealthStatsParceler[] parcelers = mBatteryStats.takeUidSnapshots(uids); in takeUidSnapshots()
/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()
DWifiPowerMetrics.java42 private final IBatteryStats mBatteryStats; field in WifiPowerMetrics
45 mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService( in WifiPowerMetrics()
52 mBatteryStats = batteryStats; in WifiPowerMetrics()
142 return mBatteryStats.getWifiBatteryStats(); in getStats()
DWifiMulticastLockManager.java43 private final IBatteryStats mBatteryStats; field in WifiMulticastLockManager
56 mBatteryStats = batteryStats; in WifiMulticastLockManager()
153 mBatteryStats.noteWifiMulticastEnabled(uid); in acquireLock()
191 mBatteryStats.noteWifiMulticastDisabled(uid); in removeMulticasterLocked()
DWifiLockManager.java57 private final IBatteryStats mBatteryStats; field in WifiLockManager
87 mBatteryStats = batteryStats; in WifiLockManager()
712 mBatteryStats.noteFullWifiLockAcquiredFromSource(ws); in setBlameHiPerfWs()
717 mBatteryStats.noteFullWifiLockReleasedFromSource(ws); in setBlameHiPerfWs()
733 mBatteryStats.noteFullWifiLockAcquired(uid); in setBlameLowLatencyUid()
738 mBatteryStats.noteFullWifiLockReleased(uid); in setBlameLowLatencyUid()
DActiveModeWarden.java58 private final IBatteryStats mBatteryStats; field in ActiveModeWarden
138 mBatteryStats = batteryStats; in ActiveModeWarden()
618 mBatteryStats.noteWifiOn(); in updateBatteryStatsWifiState()
623 mBatteryStats.noteWifiOff(); in updateBatteryStatsWifiState()
633 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.java140 private final IBatteryStats mBatteryStats; field in WifiInjector
182 mBatteryStats = IBatteryStats.Stub.asInterface(mFrameworkFacade.getService( in WifiInjector()
184 mWifiStateTracker = new WifiStateTracker(mBatteryStats); in WifiInjector()
313 mBatteryStats); in WifiInjector()
/frameworks/base/services/core/java/com/android/server/power/
DNotifier.java116 private final IBatteryStats mBatteryStats; field in Notifier
164 mBatteryStats = batteryStats; in Notifier()
194 mBatteryStats.noteInteractive(true); in Notifier()
218 mBatteryStats.noteStartWakelockFromSource(workSource, ownerPid, tag, in onWakeLockAcquired()
221 mBatteryStats.noteStartWakelock(ownerUid, ownerPid, tag, historyTag, in onWakeLockAcquired()
241 mBatteryStats.noteLongPartialWakelockStartFromSource(tag, historyTag, workSource); in onLongPartialWakeLockStart()
245 mBatteryStats.noteLongPartialWakelockStart(tag, historyTag, ownerUid); in onLongPartialWakeLockStart()
264 mBatteryStats.noteLongPartialWakelockFinishFromSource(tag, historyTag, workSource); in onLongPartialWakeLockFinish()
268 mBatteryStats.noteLongPartialWakelockFinish(tag, historyTag, ownerUid); in onLongPartialWakeLockFinish()
300 mBatteryStats.noteChangeWakelockFromSource(workSource, ownerPid, tag, historyTag, in onWakeLockChanging()
[all …]
/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()
85 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.java366 private final IBatteryStats mBatteryStats; field in GnssMetrics.GnssPowerMetrics
375 mBatteryStats = stats; in GnssPowerMetrics()
407 return mBatteryStats.getGpsBatteryStats(); in getGpsBatteryStats()
436 mBatteryStats.noteGpsSignalQuality(signalLevel); in reportSignalQuality()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/scanner/
DWifiScanningServiceTest.java125 @Mock IBatteryStats mBatteryStats; field in WifiScanningServiceTest
169 mWifiScannerImplFactory, mBatteryStats, mWifiInjector); in setUp()
461 mWifiScannerImplFactory, mBatteryStats); in construct()
613 verify(mBatteryStats).noteWifiScanStartedFromSource(eq(workSource)); in doSuccessfulSingleScan()
623 verify(mBatteryStats).noteWifiScanStoppedFromSource(eq(workSource)); in doSuccessfulSingleScan()
734 verify(mBatteryStats, never()).noteWifiScanStoppedFromSource(eq(workSource)); in sendSingleScanRequestWithPrivilegedTypeParamsSetFromNonPrivilegedApp()
786 verify(mBatteryStats, never()).noteWifiScanStoppedFromSource(eq(workSource)); in sendSingleScanRequestWithPrivilegedHiddenNetworkParamsSetFromNonPrivilegedApp()
831 verify(mBatteryStats, never()).noteWifiScanStoppedFromSource(eq(workSource)); in sendSingleScanRequestWithInvalidScanType()
881 verifyNoMoreInteractions(mBatteryStats); in sendSingleScanRequestWhichFailsToStart()
917 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()
278 mBatteryStats.noteJobStart(job.getBatteryName(), job.getSourceUid(), in executeRunnableJob()
787 mBatteryStats.noteJobFinish(mRunningJob.getBatteryName(), in closeAndCleanupJobLocked()
/frameworks/base/services/core/java/com/android/server/display/
DDisplayPowerController.java151 private final IBatteryStats mBatteryStats; field in DisplayPowerController
398 mBatteryStats = BatteryStatsService.getService(); in DisplayPowerController()
692 mBatteryStats.noteScreenState(mPowerState.getScreenState()); in initialize()
693 mBatteryStats.noteScreenBrightness(mPowerState.getScreenBrightness()); in initialize()
1238 mBatteryStats.noteScreenState(state);
1301 mBatteryStats.noteScreenBrightness(target);
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/
DWifiScanningServiceImpl.java344 private final IBatteryStats mBatteryStats; field in WifiScanningServiceImpl
357 mBatteryStats = batteryStats; in WifiScanningServiceImpl()
733 mBatteryStats.noteWifiScanStartedFromSource(mScanWorkSource); in enter()
745 mBatteryStats.noteWifiScanStoppedFromSource(mScanWorkSource); in exit()
1925 mBatteryStats.noteWifiBatchedScanStartedFromSource(mWorkSource, csph); in reportBatchedScanStart()
1937 mBatteryStats.noteWifiBatchedScanStoppedFromSource(mWorkSource); in reportBatchedScanStop()
/frameworks/base/services/core/java/com/android/server/
DTelephonyRegistry.java167 private final IBatteryStats mBatteryStats; field in TelephonyRegistry
372 mBatteryStats = BatteryStatsService.getService(); in TelephonyRegistry()
2027 mBatteryStats.notePhoneState(state.getState()); in broadcastServiceStateChanged()
2050 mBatteryStats.notePhoneSignalStrength(signalStrength); in broadcastSignalStrengthChanged()
2077 mBatteryStats.notePhoneOff(); in broadcastCallStateChanged()
2081 mBatteryStats.notePhoneOn(); in broadcastCallStateChanged()
DNetworkManagementService.java164 private IBatteryStats mBatteryStats; field in NetworkManagementService
309 if (mBatteryStats != null) { in getBatteryStats()
310 return mBatteryStats; in getBatteryStats()
312 mBatteryStats = in getBatteryStats()
314 return mBatteryStats; in getBatteryStats()
/frameworks/base/services/core/java/com/android/server/location/
DGnssLocationProvider.java424 private final IBatteryStats mBatteryStats; field in GnssLocationProvider
607 mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService( in GnssLocationProvider()
654 mGnssMetrics = new GnssMetrics(mBatteryStats); in GnssLocationProvider()
1116 mBatteryStats.noteGpsChanged(mClientSource, source); in updateClientUids()

12