/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | BatteryInputSuspendTest.java | 62 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/ |
D | BatteryMeterView.java | 239 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/ |
D | CachedDeviceState.java | 47 public CachedDeviceState(boolean isCharging, boolean isScreenInteractive) { in CachedDeviceState() argument 48 mCharging = isCharging; in CachedDeviceState() 84 public boolean isCharging() { in isCharging() method in CachedDeviceState.Readonly
|
D | LooperStats.java | 151 if (mDeviceState.isCharging()) { in deviceStateAllowsCollection()
|
D | BinderCallsStats.java | 445 if (mDeviceState.isCharging()) { in canCollect()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/ |
D | CachedDeviceStateServiceTest.java | 124 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/ |
D | DiskStatsLoggingService.java | 60 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/ |
D | PowerMetricsCollector.java | 116 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/ |
D | StylusManager.kt | 181 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/ |
D | IdlenessTracker.java | 52 void onBatteryStateChanged(boolean isCharging, boolean isBatteryNotLow); in onBatteryStateChanged() argument
|
D | DeviceIdlenessTracker.java | 179 public void onBatteryStateChanged(boolean isCharging, boolean isBatteryNotLow) { in onBatteryStateChanged() argument 180 final boolean isStablePower = isCharging && isBatteryNotLow; in onBatteryStateChanged()
|
D | CarIdlenessTracker.java | 107 public void onBatteryStateChanged(boolean isCharging, boolean isBatteryNotLow) { in onBatteryStateChanged() argument
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/battery/ |
D | BatteryMeterViewTest.kt | 347 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/ |
D | BatteryManager.java | 462 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/ |
D | DeviceIdlenessTrackerTest.java | 154 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/ |
D | DeviceIdleControllerTest.java | 433 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/ |
D | JobSchedulerServiceTest.java | 1755 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/ |
D | ClockEventController.kt | 233 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/ |
D | IBatteryStats.aidl | 81 boolean isCharging(); in isCharging() method
|
/frameworks/base/apex/jobscheduler/service/java/com/android/server/usage/ |
D | AppStandbyController.java | 722 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/ |
D | DiskStatsLoggingServiceTest.java | 181 when(batteryManager.isCharging()).thenReturn(true); in testDontCrashOnRun()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | DeviceStateMonitor.java | 720 boolean retval = bm.isCharging(); in isDeviceCharging()
|
/frameworks/base/services/core/java/com/android/server/dreams/ |
D | DreamManagerService.java | 318 mIsCharging = mContext.getSystemService(BatteryManager.class).isCharging(); in onBootPhase()
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | BatteryStatsService.java | 1159 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/ |
D | QuotaController.java | 1642 private void setStatus(long nowElapsed, boolean isCharging) { in setStatus() argument 1644 mIsCharging = isCharging; in setStatus()
|