Home
last modified time | relevance | path

Searched refs:isCharging (Results 1 – 25 of 37) sorted by relevance

12

/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryInputSuspendTest.java62 assertTrue("Device must be connected to USB", mChargerStateMonitor.isCharging()); in verifyCharging()
99 if (isCharging(intent) == mExpectedChargingState) { in ChargerStateMonitor()
107 public boolean isCharging() { in isCharging() method in BatteryInputSuspendTest.ChargerStateMonitor
108 return isCharging(mBatteryMonitor); in isCharging()
111 private boolean isCharging(Intent batteryMonitor) { in isCharging() method in BatteryInputSuspendTest.ChargerStateMonitor
118 boolean charging = isCharging(); in waitForChargerState()
/frameworks/base/packages/SystemUI/src/com/android/systemui/battery/
DBatteryMeterView.java239 boolean wasCharging = isCharging(); in onBatteryLevelChanged()
242 boolean isCharging = isCharging(); in onBatteryLevelChanged()
243 mDrawable.setCharging(isCharging); in onBatteryLevelChanged()
249 if (isCharging != wasCharging) { in onBatteryLevelChanged()
250 attr = getBatteryAttribution(isCharging); in onBatteryLevelChanged()
267 private Drawable getBatteryAttribution(boolean isCharging) { in getBatteryAttribution() argument
275 } else if (isCharging) { in getBatteryAttribution()
300 boolean isCharging, in getColorProfile() argument
303 if (isCharging) return ColorProfile.Active; in getColorProfile()
324 getBatteryAttribution(isCharging()) in onPowerSaveChanged()
[all …]
/frameworks/base/core/java/com/android/internal/os/
DCachedDeviceState.java47 public CachedDeviceState(boolean isCharging, boolean isScreenInteractive) { in CachedDeviceState() argument
48 mCharging = isCharging; in CachedDeviceState()
84 public boolean isCharging() { in isCharging() method in CachedDeviceState.Readonly
DLooperStats.java151 if (mDeviceState.isCharging()) { in deviceStateAllowsCollection()
DBinderCallsStats.java445 if (mDeviceState.isCharging()) { in canCollect()
/frameworks/base/services/tests/servicestests/src/com/android/server/
DCachedDeviceStateServiceTest.java124 assertThat(deviceState.isCharging()).isTrue(); in correctlyReportsCharging()
128 assertThat(deviceState.isCharging()).isFalse(); in correctlyReportsCharging()
133 assertThat(deviceState.isCharging()).isTrue(); in correctlyReportsCharging()
138 assertThat(deviceState.isCharging()).isFalse(); in correctlyReportsCharging()
/frameworks/base/services/core/java/com/android/server/storage/
DDiskStatsLoggingService.java60 if (!isCharging(this) || !isDumpsysTaskEnabled(getContentResolver())) { in onStartJob()
108 private static boolean isCharging(Context context) { in isCharging() method in DiskStatsLoggingService
112 return batteryManager.isCharging(); in isCharging()
/frameworks/base/core/tests/batterystatstests/BatteryStatsLoadTests/src/com/android/frameworks/core/batterystatsloadtests/
DPowerMetricsCollector.java116 if (!isCharging(intent)) {
126 if (isCharging(intent)) {
148 if (isCharging(intent)) {
166 private boolean isCharging(Intent intent) {
/frameworks/base/packages/SystemUI/src/com/android/systemui/stylus/
DStylusManager.kt181 val isCharging = String(value) == "true" in <lambda>() constant
185 "${device.address}: $isCharging" in <lambda>()
189 cb.onStylusBluetoothChargingStateChanged(inputDeviceId, device, isCharging) in <lambda>()
376 isCharging: Boolean in <lambda>()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/idle/
DIdlenessTracker.java52 void onBatteryStateChanged(boolean isCharging, boolean isBatteryNotLow); in onBatteryStateChanged() argument
DDeviceIdlenessTracker.java179 public void onBatteryStateChanged(boolean isCharging, boolean isBatteryNotLow) { in onBatteryStateChanged() argument
180 final boolean isStablePower = isCharging && isBatteryNotLow; in onBatteryStateChanged()
DCarIdlenessTracker.java107 public void onBatteryStateChanged(boolean isCharging, boolean isBatteryNotLow) { in onBatteryStateChanged() argument
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/battery/
DBatteryMeterViewTest.kt347 assertThat(mBatteryMeterView.isCharging).isFalse() in isIncompatibleChargingChanged_true_drawableGetsChargingFalse_flagOff()
358 assertThat(mBatteryMeterView.isCharging).isFalse() in isIncompatibleChargingChanged_true_drawableGetsChargingFalse_flagOn()
379 assertThat(mBatteryMeterView.isCharging).isTrue() in isIncompatibleChargingChanged_false_drawableGetsChargingTrue_flagOn()
/frameworks/base/core/java/android/os/
DBatteryManager.java462 public boolean isCharging() { in isCharging() method in BatteryManager
464 return mBatteryStats.isCharging(); in isCharging()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/idle/
DDeviceIdlenessTrackerTest.java154 private void setBatteryState(boolean isCharging, boolean isBatteryNotLow) { in setBatteryState() argument
155 doReturn(isCharging).when(mJobSchedulerService).isBatteryCharging(); in setBatteryState()
157 mDeviceIdlenessTracker.onBatteryStateChanged(isCharging, isBatteryNotLow); in setBatteryState()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/
DDeviceIdleControllerTest.java433 assertFalse(mDeviceIdleController.isCharging()); in testUpdateChargingLocked()
437 assertFalse(mDeviceIdleController.isCharging()); in testUpdateChargingLocked()
441 assertTrue(mDeviceIdleController.isCharging()); in testUpdateChargingLocked()
445 assertTrue(mDeviceIdleController.isCharging()); in testUpdateChargingLocked()
449 assertFalse(mDeviceIdleController.isCharging()); in testUpdateChargingLocked()
2822 assertFalse(mDeviceIdleController.isCharging()); in verifyStateConditions()
2832 assertFalse(mDeviceIdleController.isCharging()); in verifyStateConditions()
2844 assertFalse(mDeviceIdleController.isCharging()); in verifyStateConditions()
2853 assertFalse(mDeviceIdleController.isCharging()); in verifyStateConditions()
2865 assertFalse(mDeviceIdleController.isCharging()); in verifyStateConditions()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/
DJobSchedulerServiceTest.java1755 assertFalse(tracker.isCharging()); in testIsCharging_standardChargingIntent()
1759 assertTrue(tracker.isCharging()); in testIsCharging_standardChargingIntent()
1763 assertFalse(tracker.isCharging()); in testIsCharging_standardChargingIntent()
1772 assertFalse(tracker.isCharging()); in testIsCharging_adaptiveCharging_batteryTooLow()
1777 assertFalse(tracker.isCharging()); in testIsCharging_adaptiveCharging_batteryTooLow()
1783 assertTrue(tracker.isCharging()); in testIsCharging_adaptiveCharging_batteryTooLow()
1796 assertTrue(tracker.isCharging()); in testIsCharging_adaptiveCharging_chargeBelowThreshold()
1801 assertTrue(tracker.isCharging()); in testIsCharging_adaptiveCharging_chargeBelowThreshold()
1815 assertTrue(tracker.isCharging()); in testIsCharging_adaptiveCharging_dischargeAboveThreshold()
1820 assertEquals(level >= 70, tracker.isCharging()); in testIsCharging_adaptiveCharging_dischargeAboveThreshold()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DClockEventController.kt233 private var isCharging = false in <lambda>() variable
317 if (isKeyguardVisible && !isCharging && charging) { in <lambda>()
323 isCharging = charging in <lambda>()
/frameworks/base/core/java/com/android/internal/app/
DIBatteryStats.aidl81 boolean isCharging(); in isCharging() method
/frameworks/base/apex/jobscheduler/service/java/com/android/server/usage/
DAppStandbyController.java722 setChargingState(mInjector.isCharging()); in onBootPhase()
865 void setChargingState(boolean isCharging) { in setChargingState() argument
866 if (mIsCharging != isCharging) { in setChargingState()
867 if (DEBUG) Slog.d(TAG, "Setting mIsCharging to " + isCharging); in setChargingState()
868 mIsCharging = isCharging; in setChargingState()
2708 boolean isCharging() { in isCharging() method in AppStandbyController.Injector
2709 return mBatteryManager.isCharging(); in isCharging()
/frameworks/base/services/tests/servicestests/src/com/android/server/storage/
DDiskStatsLoggingServiceTest.java181 when(batteryManager.isCharging()).thenReturn(true); in testDontCrashOnRun()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DDeviceStateMonitor.java720 boolean retval = bm.isCharging(); in isDeviceCharging()
/frameworks/base/services/core/java/com/android/server/dreams/
DDreamManagerService.java318 mIsCharging = mContext.getSystemService(BatteryManager.class).isCharging(); in onBootPhase()
/frameworks/base/services/core/java/com/android/server/am/
DBatteryStatsService.java1159 public boolean isCharging() { in isCharging() method in BatteryStatsService
1161 return mStats.isCharging(); in isCharging()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/
DQuotaController.java1642 private void setStatus(long nowElapsed, boolean isCharging) { in setStatus() argument
1644 mIsCharging = isCharging; in setStatus()

12