最終更新:2021-10-14 (木) 18:53:31 (932d)
AOSP/frameworks/base/core/java/android/hardware/usb/UsbPort.java
状態例
connected=true, currentMode=audio_acc, currentPowerRole=source, currentDataRole=host, supportedRoleCombinations=[source:host, sink:device], contaminantDetectionStatus=2, contaminantProtectionStatus=0}, canChangeMode=true, canChangePowerRole=false, canChangeDataRole=false, connectedAtMillis=11907515,
モード
MODE_NONE MODE_DFP This USB port can act as a downstream facing port (host) MODE_UFP This USB port can act as an upstream facing port (device). MODE_DRP This USB port can act either as an downstream facing port (host) or as an upstream facing port (device). MODE_AUDIO_ACCESSORY android.hardware.usb.V1_1.Constants.PortMode_1_1.AUDIO_ACCESSORY This USB port can support USB Type-C Audio accessory. MODE_DEBUG_ACCESSORY android.hardware.usb.V1_1.Constants.PortMode_1_1.DEBUG_ACCESSORY This USB port can support USB Type-C debug accessory
パワーロール
POWER_ROLE_NONE This USB port does not have a power role. POWER_ROLE_SOURCE This USB port can act as a source (provide power). POWER_ROLE_SINK This USB port can act as a sink (receive power).
データロール
DATA_ROLE_NONE DATA_ROLE_HOST DATA_ROLE_DEVICE