Merge "Remove plug/unplug condition for the incompatible charging state" into udc-dev am: 13c4524987
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22611216 Change-Id: I87839a718e1dde96d5cded817a741ab3e8870242 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user