Update incompatible charger checking rule

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

Bug: 308700954
Test: make test RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.fuelgauge
Change-Id: I1935740a7e4dca447fd545bbd46c35b42eeba508
This commit is contained in:
Roy Luo
2023-11-03 22:39:18 +00:00
parent d37878f7d6
commit 5b93f8b399

View File

@@ -219,7 +219,7 @@ public class BatteryTestUtils {
when(mockUsbPort.supportsComplianceWarnings()).thenReturn(true); when(mockUsbPort.supportsComplianceWarnings()).thenReturn(true);
when(mockUsbPortStatus.isConnected()).thenReturn(true); when(mockUsbPortStatus.isConnected()).thenReturn(true);
when(mockUsbPortStatus.getComplianceWarnings()) when(mockUsbPortStatus.getComplianceWarnings())
.thenReturn(new int[]{UsbPortStatus.COMPLIANCE_WARNING_OTHER}); .thenReturn(new int[]{UsbPortStatus.COMPLIANCE_WARNING_DEBUG_ACCESSORY});
} }
/** /**