Update incompatible charger checking rule

Use COMPLIANCE_WARNING_DEBUG_ACCESSORY to mock incompatible charging
event as COMPLIANCE_WARNING_OTHER is being deprecated.

Bug: 308700954
Bug: 310660470
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge.batterytip"
Flag: ACONFIG enable_input_power_limited_warning ENABLED
Change-Id: Ib6f7cf253344db99a8cc1d06c59a5c35d40f736f
This commit is contained in:
Roy Luo
2023-11-14 01:42:43 +00:00
parent 11d12705d7
commit ef2cd0640e

View File

@@ -81,6 +81,7 @@ public final class IncompatibleChargerDetectorTest {
when(mUsbPort.getStatus()).thenReturn(mUsbPortStatus); when(mUsbPort.getStatus()).thenReturn(mUsbPortStatus);
when(mUsbPort.supportsComplianceWarnings()).thenReturn(true); when(mUsbPort.supportsComplianceWarnings()).thenReturn(true);
when(mUsbPortStatus.isConnected()).thenReturn(true); when(mUsbPortStatus.isConnected()).thenReturn(true);
when(mUsbPortStatus.getComplianceWarnings()).thenReturn(new int[] {1}); when(mUsbPortStatus.getComplianceWarnings())
.thenReturn(new int[] {UsbPortStatus.COMPLIANCE_WARNING_DEBUG_ACCESSORY});
} }
} }