commit | ef2cd0640e2dff1cbc82e6724555c2f7bf5f6bd8 | [log] [tgz] |
---|---|---|
author | Roy Luo <royluo@google.com> | Tue Nov 14 01:42:43 2023 +0000 |
committer | Roy Luo <royluo@google.com> | Tue Nov 14 01:44:06 2023 +0000 |
tree | 90b8acf89ff210bea75d4947067805f24e4c1f9e | |
parent | 11d12705d789b5f90c4873ad42b97fd2692f7160 [diff] |
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
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/IncompatibleChargerDetectorTest.java b/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/IncompatibleChargerDetectorTest.java index 3f65a67..c0f6108 100644 --- a/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/IncompatibleChargerDetectorTest.java +++ b/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/IncompatibleChargerDetectorTest.java
@@ -81,6 +81,7 @@ when(mUsbPort.getStatus()).thenReturn(mUsbPortStatus); when(mUsbPort.supportsComplianceWarnings()).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}); } }