Methods Summary |
---|
public int | describeContents()
return 0;
|
public int | getId()Returns the configuration's ID field.
This is an integer that uniquely identifies the configuration on the device.
return mId;
|
public UsbInterface | getInterface(int index)Returns the {@link UsbInterface} at the given index.
return (UsbInterface)mInterfaces[index];
|
public int | getInterfaceCount()Returns the number of {@link UsbInterface}s this configuration contains.
return mInterfaces.length;
|
public int | getMaxPower()Returns the configuration's max power consumption, in milliamps.
return mMaxPower * 2;
|
public java.lang.String | getName()Returns the configuration's name.
return mName;
|
public boolean | isRemoteWakeup()Returns the remote-wakeup attribute value configuration's attributes field.
This attributes that the device may signal the host to wake from suspend.
return (mAttributes & ATTR_REMOTE_WAKEUP) != 0;
|
public boolean | isSelfPowered()Returns the self-powered attribute value configuration's attributes field.
This attribute indicates that the device has a power source other than the USB connection.
return (mAttributes & ATTR_SELF_POWERED) != 0;
|
public void | setInterfaces(android.os.Parcelable[] interfaces)Only used by UsbService implementation
mInterfaces = interfaces;
|
public java.lang.String | toString()
StringBuilder builder = new StringBuilder("UsbConfiguration[mId=" + mId +
",mName=" + mName + ",mAttributes=" + mAttributes +
",mMaxPower=" + mMaxPower + ",mInterfaces=[");
for (int i = 0; i < mInterfaces.length; i++) {
builder.append("\n");
builder.append(mInterfaces[i].toString());
}
builder.append("]");
return builder.toString();
|
public void | writeToParcel(android.os.Parcel parcel, int flags)
parcel.writeInt(mId);
parcel.writeString(mName);
parcel.writeInt(mAttributes);
parcel.writeInt(mMaxPower);
parcel.writeParcelableArray(mInterfaces, 0);
|