Home
last modified time | relevance | path

Searched refs:batteryManager (Results 1 – 3 of 3) sorted by relevance

/frameworks/base/services/core/java/com/android/server/
DCachedDeviceStateService.java84 final BatteryManagerInternal batteryManager = in queryIsCharging() local
86 if (batteryManager == null) { in queryIsCharging()
91 return batteryManager.getPlugType() != OsProtoEnums.BATTERY_PLUGGED_NONE; in queryIsCharging()
/frameworks/base/services/core/java/com/android/server/storage/
DDiskStatsLoggingService.java109 BatteryManager batteryManager = in isCharging() local
111 if (batteryManager != null) { in isCharging()
112 return batteryManager.isCharging(); in isCharging()
/frameworks/base/services/tests/servicestests/src/com/android/server/storage/
DDiskStatsLoggingServiceTest.java180 BatteryManager batteryManager = mock(BatteryManager.class); in testDontCrashOnRun() local
181 when(batteryManager.isCharging()).thenReturn(true); in testDontCrashOnRun()
182 doReturn(batteryManager).when(service).getSystemService(Context.BATTERY_SERVICE); in testDontCrashOnRun()