Merge "Remove plug/unplug condition for the incompatible charging state" into udc-dev

This commit is contained in:
YK Hung
2023-04-17 08:48:44 +00:00
committed by Android (Google) Code Review
2 changed files with 0 additions and 17 deletions

View File

@@ -1771,10 +1771,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
MSG_TIMEZONE_UPDATE, intent.getStringExtra(Intent.EXTRA_TIMEZONE));
mHandler.sendMessage(msg);
} else if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {
// Clear incompatible charger state when device is unplugged.
if (!BatteryStatus.isPluggedIn(intent)) {
mIncompatibleCharger = false;
}
final Message msg = mHandler.obtainMessage(
MSG_BATTERY_UPDATE, new BatteryStatus(intent, mIncompatibleCharger));
mHandler.sendMessage(msg);

View File

@@ -2527,19 +2527,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
assertThat(mKeyguardUpdateMonitor.mIncompatibleCharger).isTrue();
}
@Test
public void testBatteryChangedIntent_unplugDevice_resetIncompatibleCharger() {
mKeyguardUpdateMonitor.mIncompatibleCharger = true;
Intent batteryChangedIntent =
getBatteryIntent().putExtra(BatteryManager.EXTRA_PLUGGED, -1);
mKeyguardUpdateMonitor.mBroadcastReceiver.onReceive(mContext, batteryChangedIntent);
BatteryStatus status = verifyRefreshBatteryInfo();
assertThat(status.incompatibleCharger.get()).isFalse();
assertThat(mKeyguardUpdateMonitor.mIncompatibleCharger).isFalse();
}
@Test
public void unfoldWakeup_requestActiveUnlock_forceDismissKeyguard()
throws RemoteException {