Searched refs:isCharging (Results 1 – 5 of 5) sorted by relevance
92 when(mBatteryManager.isCharging()).thenReturn(true); in testBatteryConnected()94 assertThat(JobPreconditions.isCharging(mContext)).isTrue(); in testBatteryConnected()99 when(mBatteryManager.isCharging()).thenReturn(false); in testBatteryDisconnected()101 assertThat(JobPreconditions.isCharging(mContext)).isFalse(); in testBatteryDisconnected()
82 when(mBatteryManager.isCharging()).thenReturn(true); in setUp()118 when(mBatteryManager.isCharging()).thenReturn(false); in testJobRequiresCharging()123 when(mBatteryManager.isCharging()).thenReturn(true); in testJobRequiresCharging()
42 public static boolean isCharging(Context context) { in isCharging() method in JobPreconditions46 return batteryManager.isCharging(); in isCharging()
122 return JobPreconditions.isCharging(context); in preconditionsFulfilled()
119 if (batteryManager != null && !batteryManager.isCharging()) { in onCreatePreferences()