Home
last modified time | relevance | path

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

/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DBatteryUsageStatsRule.java71 private MockBatteryStatsImpl mBatteryStats; field in BatteryUsageStatsRule
110 if (mBatteryStats != null) return; in initBatteryStats()
120 mBatteryStats = new MockBatteryStatsImpl(mBatteryStatsConfigBuilder.build(), in initBatteryStats()
122 mBatteryStats.setPowerProfile(mPowerProfile); in initBatteryStats()
123 mBatteryStats.setCpuScalingPolicies(new CpuScalingPolicies(mCpusByPolicy, mFreqsByPolicy)); in initBatteryStats()
124 synchronized (mBatteryStats) { in initBatteryStats()
125 mBatteryStats.initEnergyConsumerStatsLocked(mSupportedStandardBuckets, in initBatteryStats()
128 mBatteryStats.informThatAllExternalStatsAreFlushed(); in initBatteryStats()
131 mBatteryStats.setDisplayCountLocked(mDisplayCount); in initBatteryStats()
134 synchronized (mBatteryStats) { in initBatteryStats()
[all …]
DBatteryStatsHistoryIteratorTest.java55 private MockBatteryStatsImpl mBatteryStats; field in BatteryStatsHistoryIteratorTest
63 mBatteryStats = new MockBatteryStatsImpl(mMockClock, historyDir); in setup()
64 mBatteryStats.setDummyExternalStatsSync(mExternalStatsSync); in setup()
65 mBatteryStats.setRecordAllHistoryLocked(true); in setup()
66 mBatteryStats.forceRecordAllHistory(); in setup()
67 mBatteryStats.setNoAutoReset(true); in setup()
88 mBatteryStats.iterateBatteryStatsHistory(0, MonotonicClock.UNDEFINED); in unconstrainedIteration()
126 assertIncludedEvents(mBatteryStats.iterateBatteryStatsHistory(0, MonotonicClock.UNDEFINED), in constrainedIteration()
129 mBatteryStats.iterateBatteryStatsHistory(2000_000, MonotonicClock.UNDEFINED), in constrainedIteration()
131 assertIncludedEvents(mBatteryStats.iterateBatteryStatsHistory(0, 3000_000L), in constrainedIteration()
[all …]
DWifiPowerStatsCollectorTest.java77 private MockBatteryStatsImpl mBatteryStats; field in WifiPowerStatsCollectorTest
189 mBatteryStats = mStatsRule.getBatteryStats(); in setup()
195 PowerStatsCollector collector = mBatteryStats.getPowerStatsCollector( in triggering()
199 mBatteryStats.setPowerStatsCollectorEnabled(BatteryConsumer.POWER_COMPONENT_WIFI, true); in triggering()
204 mBatteryStats.onSystemReady(mContext); in triggering()
211 mBatteryStats.noteWifiOnLocked(mClock.realtime, mClock.uptime); in triggering()
217 mBatteryStats.noteWifiOffLocked(mClock.realtime, mClock.uptime); in triggering()
223 mBatteryStats.noteWifiRunningLocked(new WorkSource(APP_UID1), mClock.realtime, in triggering()
230 mBatteryStats.noteWifiStoppedLocked(new WorkSource(APP_UID1), mClock.realtime, in triggering()
237 mBatteryStats.noteWifiStateLocked(BatteryStatsManager.WIFI_STATE_ON_CONNECTED_STA, in triggering()
DBluetoothPowerStatsCollectorTest.java67 private MockBatteryStatsImpl mBatteryStats; field in BluetoothPowerStatsCollectorTest
152 mBatteryStats = mStatsRule.getBatteryStats(); in setup()
158 PowerStatsCollector collector = mBatteryStats.getPowerStatsCollector( in triggering()
162 mBatteryStats.setPowerStatsCollectorEnabled(BatteryConsumer.POWER_COMPONENT_BLUETOOTH, in triggering()
165 mBatteryStats.setDummyExternalStatsSync(new MockBatteryStatsImpl.DummyExternalStatsSync(){ in triggering()
175 mBatteryStats.onSystemReady(mContext); in triggering()
182 mBatteryStats.noteUidProcessStateLocked(APP_UID1, ActivityManager.PROCESS_STATE_TOP, in triggering()
DMobileRadioPowerStatsCollectorTest.java85 private MockBatteryStatsImpl mBatteryStats; field in MobileRadioPowerStatsCollectorTest
179 mBatteryStats = mStatsRule.getBatteryStats(); in setup()
185 PowerStatsCollector collector = mBatteryStats.getPowerStatsCollector( in triggering()
189 mBatteryStats.setPowerStatsCollectorEnabled(BatteryConsumer.POWER_COMPONENT_MOBILE_RADIO, in triggering()
195 mBatteryStats.onSystemReady(mContext); in triggering()
202 mBatteryStats.notePhoneOnLocked(mClock.realtime, mClock.uptime); in triggering()
208 mBatteryStats.notePhoneOffLocked(mClock.realtime, mClock.uptime); in triggering()
214 mBatteryStats.noteMobileRadioPowerStateLocked( in triggering()
219 mBatteryStats.noteMobileRadioPowerStateLocked(DataConnectionRealTimeInfo.DC_POWER_STATE_LOW, in triggering()
226 mBatteryStats.noteMobileRadioPowerStateLocked( in triggering()
[all …]
/frameworks/base/core/java/android/os/
DBatteryStatsManager.java161 private final IBatteryStats mBatteryStats; field in BatteryStatsManager
165 mBatteryStats = batteryStats; in BatteryStatsManager()
203 return mBatteryStats.getBatteryUsageStats(queries); in getBatteryUsageStats()
217 mBatteryStats.noteWifiRssiChanged(newRssi); in reportWifiRssiChanged()
229 mBatteryStats.noteWifiOn(); in reportWifiOn()
241 mBatteryStats.noteWifiOff(); in reportWifiOff()
257 mBatteryStats.noteWifiState(newWifiState, accessPoint); in reportWifiState()
271 mBatteryStats.noteWifiScanStartedFromSource(ws); in reportWifiScanStartedFromSource()
285 mBatteryStats.noteWifiScanStoppedFromSource(ws); in reportWifiScanStoppedFromSource()
301 mBatteryStats.noteWifiBatchedScanStartedFromSource(ws, csph); in reportWifiBatchedScanStartedFromSource()
[all …]
DBatteryManager.java433 private final IBatteryStats mBatteryStats; field in BatteryManager
441 mBatteryStats = IBatteryStats.Stub.asInterface( in BatteryManager()
452 mBatteryStats = batteryStats; in BatteryManager()
464 return mBatteryStats.isCharging(); in isCharging()
585 return mBatteryStats.computeChargeTimeRemaining(); in computeChargeTimeRemaining()
607 return mBatteryStats.setChargingStateUpdateDelayMillis(delayMillis); in setChargingStateUpdateDelayMillis()
/frameworks/base/services/core/java/com/android/server/power/
DNotifier.java127 private final IBatteryStats mBatteryStats; field in Notifier
201 mBatteryStats = batteryStats; in Notifier()
237 mBatteryStats.noteInteractive(true); in Notifier()
283 mBatteryStats.noteStartWakelockFromSource(workSource, ownerPid, tag, in onWakeLockAcquired()
286 mBatteryStats.noteStartWakelock(ownerUid, ownerPid, tag, historyTag, in onWakeLockAcquired()
311 mBatteryStats.noteLongPartialWakelockStartFromSource(tag, historyTag, workSource); in onLongPartialWakeLockStart()
316 mBatteryStats.noteLongPartialWakelockStart(tag, historyTag, ownerUid); in onLongPartialWakeLockStart()
336 mBatteryStats.noteLongPartialWakelockFinishFromSource(tag, historyTag, workSource); in onLongPartialWakeLockFinish()
341 mBatteryStats.noteLongPartialWakelockFinish(tag, historyTag, ownerUid); in onLongPartialWakeLockFinish()
375 mBatteryStats.noteChangeWakelockFromSource(workSource, ownerPid, tag, historyTag, in onWakeLockChanging()
[all …]
DPowerManagerService.java345 private IBatteryStats mBatteryStats; field in PowerManagerService
1372 mBatteryStats = BatteryStatsService.getService();
1373 mNotifier = mInjector.createNotifier(Looper.getMainLooper(), mContext, mBatteryStats,
6352 return new ParcelDuration(mBatteryStats.computeBatteryTimeRemaining());
/frameworks/base/core/java/android/os/health/
DSystemHealthManager.java68 private final IBatteryStats mBatteryStats; field in SystemHealthManager
97 mBatteryStats = batteryStats; in SystemHealthManager()
127 final HealthStatsParceler parceler = mBatteryStats.takeUidSnapshot(uid); in takeUidSnapshot()
167 final HealthStatsParceler[] parcelers = mBatteryStats.takeUidSnapshots(uids); in takeUidSnapshots()
188 mBatteryStats.takeUidSnapshotsAsync(uids, resultReceiver); in takeUidSnapshots()
/frameworks/base/services/core/java/com/android/server/am/
DDataConnectionStats.java47 private final IBatteryStats mBatteryStats; field in DataConnectionStats
59 mBatteryStats = BatteryStatsService.getService(); in DataConnectionStats()
106 mBatteryStats.notePhoneDataConnectionState(networkType, visible, in notePhoneDataConnectionState()
/frameworks/base/services/core/java/com/android/server/location/gnss/
DGnssMetrics.java497 private final IBatteryStats mBatteryStats; field in GnssMetrics.GnssPowerMetrics
506 mBatteryStats = stats; in GnssPowerMetrics()
540 return mBatteryStats.getGpsBatteryStats(); in getGpsBatteryStats()
571 mBatteryStats.noteGpsSignalQuality(signalLevel); in reportSignalQuality()
DGnssLocationProvider.java333 private final IBatteryStats mBatteryStats; field in GnssLocationProvider
432 mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService( in GnssLocationProvider()
1117 mBatteryStats.noteGpsChanged(mClientSource, source); in updateClientUids()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkManagementService.java140 private IBatteryStats mBatteryStats; field in NetworkManagementService
297 if (mBatteryStats != null) { in getBatteryStats()
298 return mBatteryStats; in getBatteryStats()
300 mBatteryStats = in getBatteryStats()
302 return mBatteryStats; in getBatteryStats()
/frameworks/base/services/core/java/com/android/server/display/
DDisplayPowerController.java243 private final IBatteryStats mBatteryStats; field in DisplayPowerController
534 mBatteryStats = BatteryStatsService.getService(); in DisplayPowerController()
536 mBatteryStats = null; in DisplayPowerController()
2768 if (mBatteryStats != null) { in noteScreenState()
2771 mBatteryStats.noteScreenState(screenState); in noteScreenState()
2780 if (mBatteryStats != null) { in noteScreenBrightness()
2786 mBatteryStats.noteScreenBrightness(brightnessInt); in noteScreenBrightness()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/
DJobServiceContext.java156 private final IBatteryStats mBatteryStats; field in JobServiceContext
320 mBatteryStats = batteryStats; in JobServiceContext()
551 mBatteryStats.noteJobStart(job.getBatteryName(), job.getSourceUid()); in executeRunnableJob()
1604 mBatteryStats.noteJobFinish(mRunningJob.getBatteryName(), mRunningJob.getSourceUid(), in closeAndCleanupJobLocked()
/frameworks/base/services/core/java/com/android/server/
DBatteryService.java140 private final IBatteryStats mBatteryStats; field in BatteryService
235 mBatteryStats = BatteryStatsService.getService(); in BatteryService()
523 mBatteryStats.setBatteryState( in processValuesLocked()
DTelephonyRegistry.java315 private final IBatteryStats mBatteryStats; field in TelephonyRegistry
811 mBatteryStats = BatteryStatsService.getService(); in TelephonyRegistry()
3667 mBatteryStats.notePhoneState(state.getState()); in broadcastServiceStateChanged()
3791 mBatteryStats.notePhoneSignalStrength(signalStrength); in broadcastSignalStrengthChanged()
3837 mBatteryStats.notePhoneOff(); in broadcastCallStateChanged()
3841 mBatteryStats.notePhoneOn(); in broadcastCallStateChanged()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/
DDeviceIdleController.java326 private IBatteryStats mBatteryStats; field in DeviceIdleController
1975 mBatteryStats.noteDeviceIdleMode(msg.what == MSG_REPORT_IDLE_ON in handleMessage()
1998 mBatteryStats.noteDeviceIdleMode(BatteryStats.DEVICE_IDLE_MODE_OFF, in handleMessage()
2029 mBatteryStats.noteDeviceIdleMode(BatteryStats.DEVICE_IDLE_MODE_OFF, in handleMessage()
2687 mBatteryStats = BatteryStatsService.getService(); in onBootPhase()
3271 mBatteryStats.noteEvent(BatteryStats.HistoryItem.EVENT_TEMP_WHITELIST_START, in addPowerSaveTempWhitelistAppDirectInternal()
3375 mBatteryStats.noteEvent(BatteryStats.HistoryItem.EVENT_TEMP_WHITELIST_FINISH, in onAppRemovedFromTempWhitelistLocked()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/usage/
DAppStandbyController.java2617 private IBatteryStats mBatteryStats; field in AppStandbyController.Injector
2656 mBatteryStats = IBatteryStats.Stub.asInterface( in onBootPhase()
2770 if (mBatteryStats != null) { in noteEvent()
2771 mBatteryStats.noteEvent(event, packageName, uid); in noteEvent()
/frameworks/base/services/core/java/com/android/server/content/
DSyncManager.java245 private final IBatteryStats mBatteryStats; field in SyncManager
759 mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService( in SyncManager()
2144 mBatteryStats.noteSyncStart(mEventName, mSyncAdapterUid); in bindToSyncAdapter()
2164 mBatteryStats.noteSyncFinish(mEventName, mSyncAdapterUid); in close()
/frameworks/base/boot/hiddenapi/
Dhiddenapi-max-target-o.txt34104 Landroid/os/BatteryManager;->mBatteryStats:Lcom/android/internal/app/IBatteryStats;
35520 Landroid/os/health/SystemHealthManager;->mBatteryStats:Lcom/android/internal/app/IBatteryStats;