Methods Summary |
---|
public int | describeContents()
return 0;
|
public int | getAlternateSetting()Returns the interface's bAlternateSetting field.
This is an integer that along with the ID uniquely identifies
the interface on the device.
{@link UsbDeviceConnection#setInterface} can be used to switch between
two interfaces with the same ID but different alternate setting.
return mAlternateSetting;
|
public UsbEndpoint | getEndpoint(int index)Returns the {@link android.hardware.usb.UsbEndpoint} at the given index.
return (UsbEndpoint)mEndpoints[index];
|
public int | getEndpointCount()Returns the number of {@link android.hardware.usb.UsbEndpoint}s this interface contains.
return mEndpoints.length;
|
public int | getId()Returns the interface's bInterfaceNumber field.
This is an integer that along with the alternate setting uniquely identifies
the interface on the device.
return mId;
|
public int | getInterfaceClass()Returns the interface's class field.
Some useful constants for USB classes can be found in {@link UsbConstants}
return mClass;
|
public int | getInterfaceProtocol()Returns the interface's protocol field.
return mProtocol;
|
public int | getInterfaceSubclass()Returns the interface's subclass field.
return mSubclass;
|
public java.lang.String | getName()Returns the interface's name.
return mName;
|
public void | setEndpoints(android.os.Parcelable[] endpoints)Only used by UsbService implementation
mEndpoints = endpoints;
|
public java.lang.String | toString()
StringBuilder builder = new StringBuilder("UsbInterface[mId=" + mId +
",mAlternateSetting=" + mAlternateSetting +
",mName=" + mName + ",mClass=" + mClass +
",mSubclass=" + mSubclass + ",mProtocol=" + mProtocol +
",mEndpoints=[");
for (int i = 0; i < mEndpoints.length; i++) {
builder.append("\n");
builder.append(mEndpoints[i].toString());
}
builder.append("]");
return builder.toString();
|
public void | writeToParcel(android.os.Parcel parcel, int flags)
parcel.writeInt(mId);
parcel.writeInt(mAlternateSetting);
parcel.writeString(mName);
parcel.writeInt(mClass);
parcel.writeInt(mSubclass);
parcel.writeInt(mProtocol);
parcel.writeParcelableArray(mEndpoints, 0);
|