diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 007eb305e0075..8fbee4be2ab7f 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -5818,7 +5818,7 @@ package android.hardware.usb { method public boolean isHotPlugDetectActive(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; - field public static final int DISPLAYPORT_ALT_MODE_STATUS_CAPABLE = 2; // 0x2 + field public static final int DISPLAYPORT_ALT_MODE_STATUS_CAPABLE_DISABLED = 2; // 0x2 field public static final int DISPLAYPORT_ALT_MODE_STATUS_ENABLED = 3; // 0x3 field public static final int DISPLAYPORT_ALT_MODE_STATUS_NOT_CAPABLE = 1; // 0x1 field public static final int DISPLAYPORT_ALT_MODE_STATUS_UNKNOWN = 0; // 0x0 diff --git a/core/java/android/hardware/usb/DisplayPortAltModeInfo.java b/core/java/android/hardware/usb/DisplayPortAltModeInfo.java index 7c62373b982f7..9da2f4c129778 100644 --- a/core/java/android/hardware/usb/DisplayPortAltModeInfo.java +++ b/core/java/android/hardware/usb/DisplayPortAltModeInfo.java @@ -79,7 +79,7 @@ public final class DisplayPortAltModeInfo implements Parcelable { * as one of its capabilities, however may not yet have entered DisplayPort Alt Mode or has been * configured for data transmission. */ - public static final int DISPLAYPORT_ALT_MODE_STATUS_CAPABLE = 2; + public static final int DISPLAYPORT_ALT_MODE_STATUS_CAPABLE_DISABLED = 2; /** * Port Partners: @@ -113,7 +113,7 @@ public final class DisplayPortAltModeInfo implements Parcelable { @IntDef(prefix = { "DISPLAYPORT_ALT_MODE_STATUS_" }, value = { DISPLAYPORT_ALT_MODE_STATUS_UNKNOWN, DISPLAYPORT_ALT_MODE_STATUS_NOT_CAPABLE, - DISPLAYPORT_ALT_MODE_STATUS_CAPABLE, + DISPLAYPORT_ALT_MODE_STATUS_CAPABLE_DISABLED, DISPLAYPORT_ALT_MODE_STATUS_ENABLED, }) @Retention(RetentionPolicy.SOURCE) @@ -150,10 +150,6 @@ public final class DisplayPortAltModeInfo implements Parcelable { /** * Returns the DisplayPort Alt Mode Status for a port partner acting as a sink. * - * @return {@link #DISPLAYPORT_ALT_MODE_STATUS_UNKNOWN} - * or {@link #DISPLAYPORT_ALT_MODE_STATUS_NOT_CAPABLE} - * or {@link #DISPLAYPORT_ALT_MODE_STATUS_CAPABLE} - * or {@link #DISPLAYPORT_ALT_MODE_STATUS_ENABLED} */ public @DisplayPortAltModeStatus int getPartnerSinkStatus() { return mPartnerSinkStatus; @@ -162,10 +158,6 @@ public final class DisplayPortAltModeInfo implements Parcelable { /** * Returns the DisplayPort Alt Mode Status for the attached cable * - * @return {@link #DISPLAYPORT_ALT_MODE_STATUS_UNKNOWN} - * or {@link #DISPLAYPORT_ALT_MODE_STATUS_NOT_CAPABLE} - * or {@link #DISPLAYPORT_ALT_MODE_STATUS_CAPABLE} - * or {@link #DISPLAYPORT_ALT_MODE_STATUS_ENABLED} */ public @DisplayPortAltModeStatus int getCableStatus() { return mCableStatus; diff --git a/core/java/android/hardware/usb/UsbPort.java b/core/java/android/hardware/usb/UsbPort.java index 73dcb362f3839..490b128d8bac4 100644 --- a/core/java/android/hardware/usb/UsbPort.java +++ b/core/java/android/hardware/usb/UsbPort.java @@ -54,7 +54,7 @@ import static android.hardware.usb.UsbPortStatus.COMPLIANCE_WARNING_MISSING_RP; import static android.hardware.usb.UsbPortStatus.COMPLIANCE_WARNING_OTHER; import static android.hardware.usb.DisplayPortAltModeInfo.DISPLAYPORT_ALT_MODE_STATUS_UNKNOWN; import static android.hardware.usb.DisplayPortAltModeInfo.DISPLAYPORT_ALT_MODE_STATUS_NOT_CAPABLE; -import static android.hardware.usb.DisplayPortAltModeInfo.DISPLAYPORT_ALT_MODE_STATUS_CAPABLE; +import static android.hardware.usb.DisplayPortAltModeInfo.DISPLAYPORT_ALT_MODE_STATUS_CAPABLE_DISABLED; import static android.hardware.usb.DisplayPortAltModeInfo.DISPLAYPORT_ALT_MODE_STATUS_ENABLED; import android.Manifest; @@ -807,8 +807,8 @@ public final class UsbPort { return "Unknown"; case DISPLAYPORT_ALT_MODE_STATUS_NOT_CAPABLE: return "Not Capable"; - case DISPLAYPORT_ALT_MODE_STATUS_CAPABLE: - return "Capable"; + case DISPLAYPORT_ALT_MODE_STATUS_CAPABLE_DISABLED: + return "Capable-Disabled"; case DISPLAYPORT_ALT_MODE_STATUS_ENABLED: return "Enabled"; default: diff --git a/core/java/android/hardware/usb/UsbPortStatus.java b/core/java/android/hardware/usb/UsbPortStatus.java index 8c133079a70a1..e1662b81b017b 100644 --- a/core/java/android/hardware/usb/UsbPortStatus.java +++ b/core/java/android/hardware/usb/UsbPortStatus.java @@ -311,7 +311,7 @@ public final class UsbPortStatus implements Parcelable { /** * Indicates that the Type-C plug orientation cannot be - * determined. + * determined because the connected state of the device is unknown. */ public static final int PLUG_STATE_UNKNOWN = 0; @@ -600,13 +600,8 @@ public final class UsbPortStatus implements Parcelable { } /** - * Returns the orientation state of the attached cable/adapter. + * Returns the plug state of the attached cable/adapter. * - * @return one of {@link #PLUG_STATE_UNKNOWN}, - * {@link #PLUG_STATE_UNPLUGGED}, - * {@link #PLUG_STATE_PLUGGED_ORIENTATION_UNKNOWN}, - * {@link #PLUG_STATE_PLUGGED_ORIENTATION_NORMAL}, - * {@link #PLUG_STATE_PLUGGED_ORIENTATION_FLIPPED}, */ public @PlugState int getPlugState() { return mPlugState;