diff options
author | 2022-09-16 21:01:36 +0000 | |
---|---|---|
committer | 2022-11-10 00:07:56 +0000 | |
commit | f8cef77bf15699ae8ad7373aa05ec43e032a8ca0 (patch) | |
tree | 577f593a00a8b1c3972fa5d9915018c9f9953842 /services/usb | |
parent | c2d3644fb97a61e1a5d2a1fc416efc127c07cc57 (diff) |
Usb non-compliant port partner frameworks api
Adds supportsComplianceWarnings and getComplianceWarinings to support
querying non compliant USB port partner setups. COMPLIANCE_CHANGED
broadcast is broadcasted whenever a new port with non zero compliance
warnings list is added or when compliance warnings list changes for
an existing port.
Test: atest VtsAidlUsbTargetTest
atest CtsUsbManagerTestCases
Bug: 236322506
Bug: 253298114
Change-Id: I29fab5f0191bbeb61ed54efd14838078647dd9a6
Diffstat (limited to 'services/usb')
6 files changed, 242 insertions, 17 deletions
diff --git a/services/usb/Android.bp b/services/usb/Android.bp index 3b50fa43536c..52cfe25d9f26 100644 --- a/services/usb/Android.bp +++ b/services/usb/Android.bp @@ -29,7 +29,7 @@ java_library_static { "android.hardware.usb-V1.1-java", "android.hardware.usb-V1.2-java", "android.hardware.usb-V1.3-java", - "android.hardware.usb-V1-java", + "android.hardware.usb-V2-java", "android.hardware.usb.gadget-V1.0-java", "android.hardware.usb.gadget-V1.1-java", "android.hardware.usb.gadget-V1.2-java", diff --git a/services/usb/java/com/android/server/usb/UsbPortManager.java b/services/usb/java/com/android/server/usb/UsbPortManager.java index f8df6c6ea8df..4bb9de532360 100644 --- a/services/usb/java/com/android/server/usb/UsbPortManager.java +++ b/services/usb/java/com/android/server/usb/UsbPortManager.java @@ -73,6 +73,7 @@ import android.service.ServiceProtoEnums; import android.service.usb.UsbPortInfoProto; import android.service.usb.UsbPortManagerProto; import android.util.ArrayMap; +import android.util.IntArray; import android.util.Log; import android.util.Slog; @@ -87,6 +88,7 @@ import com.android.server.usb.hal.port.RawPortInfo; import com.android.server.usb.hal.port.UsbPortHal; import com.android.server.usb.hal.port.UsbPortHalInstance; +import java.util.Arrays; import java.util.ArrayList; import java.util.NoSuchElementException; import java.util.Objects; @@ -754,6 +756,31 @@ public class UsbPortManager { } } + /** + * Sets Compliance Warnings for simulated USB port objects. + */ + public void simulateComplianceWarnings(String portId, String complianceWarningsString, + IndentingPrintWriter pw) { + synchronized (mLock) { + final RawPortInfo portInfo = mSimulatedPorts.get(portId); + if (portInfo == null) { + pw.println("Simulated port not found"); + return; + } + + IntArray complianceWarnings = new IntArray(); + for (String s : complianceWarningsString.split("[, ]")) { + if (s.length() > 0) { + complianceWarnings.add(Integer.parseInt(s)); + } + } + pw.println("Simulating Compliance Warnings: portId=" + portId + + " Warnings=" + complianceWarningsString); + portInfo.complianceWarnings = complianceWarnings.toArray(); + updatePortsLocked(pw, null); + } + } + public void disconnectSimulatedPort(String portId, IndentingPrintWriter pw) { synchronized (mLock) { final RawPortInfo portInfo = mSimulatedPorts.get(portId); @@ -842,7 +869,10 @@ public class UsbPortManager { portInfo.contaminantDetectionStatus, portInfo.usbDataStatus, portInfo.powerTransferLimited, - portInfo.powerBrickConnectionStatus, pw); + portInfo.powerBrickConnectionStatus, + portInfo.supportsComplianceWarnings, + portInfo.complianceWarnings, + pw); } } else { for (RawPortInfo currentPortInfo : newPortInfo) { @@ -857,7 +887,10 @@ public class UsbPortManager { currentPortInfo.contaminantDetectionStatus, currentPortInfo.usbDataStatus, currentPortInfo.powerTransferLimited, - currentPortInfo.powerBrickConnectionStatus, pw); + currentPortInfo.powerBrickConnectionStatus, + currentPortInfo.supportsComplianceWarnings, + currentPortInfo.complianceWarnings, + pw); } } @@ -880,6 +913,9 @@ public class UsbPortManager { handlePortRemovedLocked(portInfo, pw); break; } + if (portInfo.mComplianceWarningChange == portInfo.COMPLIANCE_WARNING_CHANGED) { + handlePortComplianceWarningLocked(portInfo, pw); + } } } @@ -896,6 +932,8 @@ public class UsbPortManager { int usbDataStatus, boolean powerTransferLimited, int powerBrickConnectionStatus, + boolean supportsComplianceWarnings, + @NonNull int[] complianceWarnings, IndentingPrintWriter pw) { // Only allow mode switch capability for dual role ports. // Validate that the current mode matches the supported modes we expect. @@ -949,13 +987,15 @@ public class UsbPortManager { portInfo = new PortInfo(mContext.getSystemService(UsbManager.class), portId, supportedModes, supportedContaminantProtectionModes, supportsEnableContaminantPresenceProtection, - supportsEnableContaminantPresenceDetection); + supportsEnableContaminantPresenceDetection, + supportsComplianceWarnings); portInfo.setStatus(currentMode, canChangeMode, currentPowerRole, canChangePowerRole, currentDataRole, canChangeDataRole, supportedRoleCombinations, contaminantProtectionStatus, contaminantDetectionStatus, usbDataStatus, - powerTransferLimited, powerBrickConnectionStatus); + powerTransferLimited, powerBrickConnectionStatus, + complianceWarnings); mPorts.put(portId, portInfo); } else { // Validate that ports aren't changing definition out from under us. @@ -987,13 +1027,13 @@ public class UsbPortManager { + ", current=" + supportsEnableContaminantPresenceDetection); } - if (portInfo.setStatus(currentMode, canChangeMode, currentPowerRole, canChangePowerRole, currentDataRole, canChangeDataRole, supportedRoleCombinations, contaminantProtectionStatus, contaminantDetectionStatus, usbDataStatus, - powerTransferLimited, powerBrickConnectionStatus)) { + powerTransferLimited, powerBrickConnectionStatus, + complianceWarnings)) { portInfo.mDisposition = PortInfo.DISPOSITION_CHANGED; } else { portInfo.mDisposition = PortInfo.DISPOSITION_READY; @@ -1019,6 +1059,11 @@ public class UsbPortManager { handlePortLocked(portInfo, pw); } + private void handlePortComplianceWarningLocked(PortInfo portInfo, IndentingPrintWriter pw) { + logAndPrint(Log.INFO, pw, "USB port compliance warning changed: " + portInfo); + sendComplianceWarningBroadcastLocked(portInfo); + } + private void handlePortRemovedLocked(PortInfo portInfo, IndentingPrintWriter pw) { logAndPrint(Log.INFO, pw, "USB port removed: " + portInfo); handlePortLocked(portInfo, pw); @@ -1056,6 +1101,23 @@ public class UsbPortManager { Manifest.permission.MANAGE_USB)); } + private void sendComplianceWarningBroadcastLocked(PortInfo portInfo) { + if (portInfo.mComplianceWarningChange == portInfo.COMPLIANCE_WARNING_UNCHANGED) { + return; + } + final Intent intent = new Intent(UsbManager.ACTION_USB_PORT_COMPLIANCE_CHANGED); + intent.addFlags( + Intent.FLAG_RECEIVER_FOREGROUND | + Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); + intent.putExtra(UsbManager.EXTRA_PORT, ParcelableUsbPort.of(portInfo.mUsbPort)); + intent.putExtra(UsbManager.EXTRA_PORT_STATUS, portInfo.mUsbPortStatus); + + // Guard against possible reentrance by posting the broadcast from the handler + // instead of from within the critical section. + mHandler.post(() -> mContext.sendBroadcastAsUser(intent, UserHandle.ALL, + Manifest.permission.MANAGE_USB)); + } + private void enableContaminantDetectionIfNeeded(PortInfo portInfo, IndentingPrintWriter pw) { if (!mConnected.containsKey(portInfo.mUsbPort.getId())) { return; @@ -1180,6 +1242,9 @@ public class UsbPortManager { public static final int DISPOSITION_READY = 2; public static final int DISPOSITION_REMOVED = 3; + public static final int COMPLIANCE_WARNING_UNCHANGED = 0; + public static final int COMPLIANCE_WARNING_CHANGED = 1; + public final UsbPort mUsbPort; public UsbPortStatus mUsbPortStatus; public boolean mCanChangeMode; @@ -1191,15 +1256,29 @@ public class UsbPortManager { public long mConnectedAtMillis; // 0 when port is connected. Else reports the last connected duration public long mLastConnectDurationMillis; + // default initialized to 0 which means no changes reported + public int mComplianceWarningChange; PortInfo(@NonNull UsbManager usbManager, @NonNull String portId, int supportedModes, int supportedContaminantProtectionModes, boolean supportsEnableContaminantPresenceDetection, - boolean supportsEnableContaminantPresenceProtection) { + boolean supportsEnableContaminantPresenceProtection, + boolean supportsComplianceWarnings) { mUsbPort = new UsbPort(usbManager, portId, supportedModes, supportedContaminantProtectionModes, supportsEnableContaminantPresenceDetection, - supportsEnableContaminantPresenceProtection); + supportsEnableContaminantPresenceProtection, + supportsComplianceWarnings); + mComplianceWarningChange = COMPLIANCE_WARNING_UNCHANGED; + } + + public boolean complianceWarningsChanged(@NonNull int[] complianceWarnings) { + if (Arrays.equals(complianceWarnings, mUsbPortStatus.getComplianceWarnings())) { + mComplianceWarningChange = COMPLIANCE_WARNING_UNCHANGED; + return false; + } + mComplianceWarningChange = COMPLIANCE_WARNING_CHANGED; + return true; } public boolean setStatus(int currentMode, boolean canChangeMode, @@ -1221,7 +1300,8 @@ public class UsbPortManager { supportedRoleCombinations, UsbPortStatus.CONTAMINANT_PROTECTION_NONE, UsbPortStatus.CONTAMINANT_DETECTION_NOT_SUPPORTED, UsbPortStatus.DATA_STATUS_UNKNOWN, false, - UsbPortStatus.POWER_BRICK_STATUS_UNKNOWN); + UsbPortStatus.POWER_BRICK_STATUS_UNKNOWN, + new int[] {}); dispositionChanged = true; } @@ -1266,8 +1346,65 @@ public class UsbPortManager { mUsbPortStatus = new UsbPortStatus(currentMode, currentPowerRole, currentDataRole, supportedRoleCombinations, contaminantProtectionStatus, contaminantDetectionStatus, usbDataStatus, - powerTransferLimited, powerBrickConnectionStatus); + powerTransferLimited, powerBrickConnectionStatus, + new int[] {}); + dispositionChanged = true; + } + + if (mUsbPortStatus.isConnected() && mConnectedAtMillis == 0) { + mConnectedAtMillis = SystemClock.elapsedRealtime(); + mLastConnectDurationMillis = 0; + } else if (!mUsbPortStatus.isConnected() && mConnectedAtMillis != 0) { + mLastConnectDurationMillis = SystemClock.elapsedRealtime() - mConnectedAtMillis; + mConnectedAtMillis = 0; + } + + return dispositionChanged; + } + + public boolean setStatus(int currentMode, boolean canChangeMode, + int currentPowerRole, boolean canChangePowerRole, + int currentDataRole, boolean canChangeDataRole, + int supportedRoleCombinations, int contaminantProtectionStatus, + int contaminantDetectionStatus, int usbDataStatus, + boolean powerTransferLimited, int powerBrickConnectionStatus, + @NonNull int[] complianceWarnings) { + boolean dispositionChanged = false; + + mCanChangeMode = canChangeMode; + mCanChangePowerRole = canChangePowerRole; + mCanChangeDataRole = canChangeDataRole; + if (mUsbPortStatus == null + || mUsbPortStatus.getCurrentMode() != currentMode + || mUsbPortStatus.getCurrentPowerRole() != currentPowerRole + || mUsbPortStatus.getCurrentDataRole() != currentDataRole + || mUsbPortStatus.getSupportedRoleCombinations() + != supportedRoleCombinations + || mUsbPortStatus.getContaminantProtectionStatus() + != contaminantProtectionStatus + || mUsbPortStatus.getContaminantDetectionStatus() + != contaminantDetectionStatus + || mUsbPortStatus.getUsbDataStatus() + != usbDataStatus + || mUsbPortStatus.isPowerTransferLimited() + != powerTransferLimited + || mUsbPortStatus.getPowerBrickConnectionStatus() + != powerBrickConnectionStatus) { + if (mUsbPortStatus == null && complianceWarnings.length > 0) { + mComplianceWarningChange = COMPLIANCE_WARNING_CHANGED; + } + mUsbPortStatus = new UsbPortStatus(currentMode, currentPowerRole, currentDataRole, + supportedRoleCombinations, contaminantProtectionStatus, + contaminantDetectionStatus, usbDataStatus, + powerTransferLimited, powerBrickConnectionStatus, + complianceWarnings); dispositionChanged = true; + } else if (complianceWarningsChanged(complianceWarnings)) { + mUsbPortStatus = new UsbPortStatus(currentMode, currentPowerRole, currentDataRole, + supportedRoleCombinations, contaminantProtectionStatus, + contaminantDetectionStatus, usbDataStatus, + powerTransferLimited, powerBrickConnectionStatus, + complianceWarnings); } if (mUsbPortStatus.isConnected() && mConnectedAtMillis == 0) { diff --git a/services/usb/java/com/android/server/usb/UsbService.java b/services/usb/java/com/android/server/usb/UsbService.java index 86f877fcd531..d91b246c3bf1 100644 --- a/services/usb/java/com/android/server/usb/UsbService.java +++ b/services/usb/java/com/android/server/usb/UsbService.java @@ -1076,6 +1076,23 @@ public class UsbService extends IUsbManager.Stub { mPortManager.dump(new DualDumpOutputStream(new IndentingPrintWriter(pw, " ")), "", 0); } + } else if ("set-compliance-reasons".equals(args[0]) && args.length == 3) { + final String portId = args[1]; + final String complianceWarnings = args[2]; + if (mPortManager != null) { + mPortManager.simulateComplianceWarnings(portId, complianceWarnings, pw); + pw.println(); + mPortManager.dump(new DualDumpOutputStream(new IndentingPrintWriter(pw, " ")), + "", 0); + } + } else if ("clear-compliance-reasons".equals(args[0]) && args.length == 2) { + final String portId = args[1]; + if (mPortManager != null) { + mPortManager.simulateComplianceWarnings(portId, "", pw); + pw.println(); + mPortManager.dump(new DualDumpOutputStream(new IndentingPrintWriter(pw, " ")), + "", 0); + } } else if ("ports".equals(args[0]) && args.length == 1) { if (mPortManager != null) { mPortManager.dump(new DualDumpOutputStream(new IndentingPrintWriter(pw, " ")), @@ -1125,6 +1142,17 @@ public class UsbService extends IUsbManager.Stub { pw.println(" dumpsys usb set-contaminant-status \"matrix\" true"); pw.println(" dumpsys usb set-contaminant-status \"matrix\" false"); pw.println(); + pw.println("Example simulate compliance warnings:"); + pw.println(" dumpsys usb add-port \"matrix\" dual"); + pw.println(" dumpsys usb set-compliance-reasons \"matrix\" <reason-list>"); + pw.println(" dumpsys usb clear-compliance-reasons \"matrix\""); + pw.println("<reason-list> is expected to be formatted as \"1, ..., 4\""); + pw.println("with reasons that need to be simulated."); + pw.println(" 1: debug accessory"); + pw.println(" 2: bc12"); + pw.println(" 3: missing rp"); + pw.println(" 4: type c"); + pw.println(); pw.println("Example USB device descriptors:"); pw.println(" dumpsys usb dump-descriptors -dump-short"); pw.println(" dumpsys usb dump-descriptors -dump-tree"); diff --git a/services/usb/java/com/android/server/usb/hal/port/RawPortInfo.java b/services/usb/java/com/android/server/usb/hal/port/RawPortInfo.java index 128a0512e830..e6a3e5343507 100644 --- a/services/usb/java/com/android/server/usb/hal/port/RawPortInfo.java +++ b/services/usb/java/com/android/server/usb/hal/port/RawPortInfo.java @@ -40,6 +40,8 @@ public final class RawPortInfo implements Parcelable { public int usbDataStatus; public boolean powerTransferLimited; public int powerBrickConnectionStatus; + public final boolean supportsComplianceWarnings; + public int[] complianceWarnings; public RawPortInfo(String portId, int supportedModes) { this.portId = portId; @@ -50,9 +52,10 @@ public final class RawPortInfo implements Parcelable { this.supportsEnableContaminantPresenceDetection = false; this.contaminantDetectionStatus = UsbPortStatus.CONTAMINANT_DETECTION_NOT_SUPPORTED; this.usbDataStatus = UsbPortStatus.DATA_STATUS_UNKNOWN; - this.powerTransferLimited = false; this.powerBrickConnectionStatus = UsbPortStatus.POWER_BRICK_STATUS_UNKNOWN; + this.supportsComplianceWarnings = false; + this.complianceWarnings = new int[] {}; } public RawPortInfo(String portId, int supportedModes, int supportedContaminantProtectionModes, @@ -66,6 +69,29 @@ public final class RawPortInfo implements Parcelable { int usbDataStatus, boolean powerTransferLimited, int powerBrickConnectionStatus) { + this(portId, supportedModes, supportedContaminantProtectionModes, + currentMode, canChangeMode, + currentPowerRole, canChangePowerRole, + currentDataRole, canChangeDataRole, + supportsEnableContaminantPresenceProtection, contaminantProtectionStatus, + supportsEnableContaminantPresenceDetection, contaminantDetectionStatus, + usbDataStatus, powerTransferLimited, powerBrickConnectionStatus, + false, new int[] {}); + } + + public RawPortInfo(String portId, int supportedModes, int supportedContaminantProtectionModes, + int currentMode, boolean canChangeMode, + int currentPowerRole, boolean canChangePowerRole, + int currentDataRole, boolean canChangeDataRole, + boolean supportsEnableContaminantPresenceProtection, + int contaminantProtectionStatus, + boolean supportsEnableContaminantPresenceDetection, + int contaminantDetectionStatus, + int usbDataStatus, + boolean powerTransferLimited, + int powerBrickConnectionStatus, + boolean supportsComplianceWarnings, + int[] complianceWarnings) { this.portId = portId; this.supportedModes = supportedModes; this.supportedContaminantProtectionModes = supportedContaminantProtectionModes; @@ -84,6 +110,8 @@ public final class RawPortInfo implements Parcelable { this.usbDataStatus = usbDataStatus; this.powerTransferLimited = powerTransferLimited; this.powerBrickConnectionStatus = powerBrickConnectionStatus; + this.supportsComplianceWarnings = supportsComplianceWarnings; + this.complianceWarnings = complianceWarnings; } @Override @@ -109,6 +137,8 @@ public final class RawPortInfo implements Parcelable { dest.writeInt(usbDataStatus); dest.writeBoolean(powerTransferLimited); dest.writeInt(powerBrickConnectionStatus); + dest.writeBoolean(supportsComplianceWarnings); + dest.writeIntArray(complianceWarnings); } public static final Parcelable.Creator<RawPortInfo> CREATOR = @@ -131,6 +161,8 @@ public final class RawPortInfo implements Parcelable { int usbDataStatus = in.readInt(); boolean powerTransferLimited = in.readBoolean(); int powerBrickConnectionStatus = in.readInt(); + boolean supportsComplianceWarnings = in.readBoolean(); + int[] complianceWarnings = in.createIntArray(); return new RawPortInfo(id, supportedModes, supportedContaminantProtectionModes, currentMode, canChangeMode, currentPowerRole, canChangePowerRole, @@ -139,7 +171,8 @@ public final class RawPortInfo implements Parcelable { contaminantProtectionStatus, supportsEnableContaminantPresenceDetection, contaminantDetectionStatus, usbDataStatus, - powerTransferLimited, powerBrickConnectionStatus); + powerTransferLimited, powerBrickConnectionStatus, + supportsComplianceWarnings, complianceWarnings); } @Override diff --git a/services/usb/java/com/android/server/usb/hal/port/UsbPortAidl.java b/services/usb/java/com/android/server/usb/hal/port/UsbPortAidl.java index 94273a37abcd..ca11629800a1 100644 --- a/services/usb/java/com/android/server/usb/hal/port/UsbPortAidl.java +++ b/services/usb/java/com/android/server/usb/hal/port/UsbPortAidl.java @@ -34,9 +34,12 @@ import android.hardware.usb.Status; import android.hardware.usb.IUsbCallback; import android.hardware.usb.PortRole; import android.hardware.usb.PortStatus; +import android.hardware.usb.ComplianceWarning; +import android.os.Build; import android.os.ServiceManager; import android.os.IBinder; import android.os.RemoteException; +import android.util.IntArray; import android.util.Log; import android.util.LongSparseArray; import android.util.Slog; @@ -46,6 +49,7 @@ import com.android.internal.util.IndentingPrintWriter; import com.android.server.usb.UsbPortManager; import com.android.server.usb.hal.port.RawPortInfo; +import java.util.Arrays; import java.util.ArrayList; import java.util.concurrent.ThreadLocalRandom; import java.util.NoSuchElementException; @@ -551,6 +555,24 @@ public final class UsbPortAidl implements UsbPortHal { return usbDataStatus; } + private int[] formatComplianceWarnings(int[] complianceWarnings) { + Objects.requireNonNull(complianceWarnings); + IntArray newComplianceWarnings = new IntArray(); + Arrays.sort(complianceWarnings); + for (int warning : complianceWarnings) { + if (newComplianceWarnings.indexOf(warning) == -1 + && warning >= UsbPortStatus.COMPLIANCE_WARNING_OTHER) { + // ComplianceWarnings range from [1, 4] in Android U + if (warning > UsbPortStatus.COMPLIANCE_WARNING_MISSING_RP) { + newComplianceWarnings.add(UsbPortStatus.COMPLIANCE_WARNING_OTHER); + } else { + newComplianceWarnings.add(warning); + } + } + } + return newComplianceWarnings.toArray(); + } + @Override public void notifyPortStatusChange( android.hardware.usb.PortStatus[] currentPortStatus, int retval) { @@ -584,7 +606,9 @@ public final class UsbPortAidl implements UsbPortHal { current.contaminantDetectionStatus, toUsbDataStatusInt(current.usbDataStatus), current.powerTransferLimited, - current.powerBrickStatus); + current.powerBrickStatus, + current.supportsComplianceWarnings, + formatComplianceWarnings(current.complianceWarnings)); newPortInfo.add(temp); UsbPortManager.logAndPrint(Log.INFO, mPw, "ClientCallback AIDL V1: " + current.portName); diff --git a/services/usb/java/com/android/server/usb/hal/port/UsbPortHidl.java b/services/usb/java/com/android/server/usb/hal/port/UsbPortHidl.java index 23d913cba733..10403c1a5f73 100644 --- a/services/usb/java/com/android/server/usb/hal/port/UsbPortHidl.java +++ b/services/usb/java/com/android/server/usb/hal/port/UsbPortHidl.java @@ -421,7 +421,8 @@ public final class UsbPortHidl implements UsbPortHal { current.currentDataRole, current.canChangeDataRole, false, CONTAMINANT_PROTECTION_NONE, false, CONTAMINANT_DETECTION_NOT_SUPPORTED, sUsbDataStatus, - false, POWER_BRICK_STATUS_UNKNOWN); + false, POWER_BRICK_STATUS_UNKNOWN, + false, new int[] {}); newPortInfo.add(temp); UsbPortManager.logAndPrint(Log.INFO, mPw, "ClientCallback V1_0: " + current.portName); @@ -455,7 +456,8 @@ public final class UsbPortHidl implements UsbPortHal { current.status.currentDataRole, current.status.canChangeDataRole, false, CONTAMINANT_PROTECTION_NONE, false, CONTAMINANT_DETECTION_NOT_SUPPORTED, sUsbDataStatus, - false, POWER_BRICK_STATUS_UNKNOWN); + false, POWER_BRICK_STATUS_UNKNOWN, + false, new int[] {}); newPortInfo.add(temp); UsbPortManager.logAndPrint(Log.INFO, mPw, "ClientCallback V1_1: " + current.status.portName); @@ -493,7 +495,8 @@ public final class UsbPortHidl implements UsbPortHal { current.supportsEnableContaminantPresenceDetection, current.contaminantDetectionStatus, sUsbDataStatus, - false, POWER_BRICK_STATUS_UNKNOWN); + false, POWER_BRICK_STATUS_UNKNOWN, + false, new int[] {}); newPortInfo.add(temp); UsbPortManager.logAndPrint(Log.INFO, mPw, "ClientCallback V1_2: " + current.status_1_1.status.portName); |