FileDocCategorySizeDatePackage
HdmiHotplugEvent.javaAPI DocAndroid 5.1 API3078Thu Mar 12 22:22:10 GMT 2015android.hardware.hdmi

HdmiHotplugEvent

public final class HdmiHotplugEvent extends Object implements android.os.Parcelable
A class that describes the HDMI port hotplug event.
hide

Fields Summary
private final int
mPort
private final boolean
mConnected
public static final Parcelable.Creator
CREATOR
Constructors Summary
public HdmiHotplugEvent(int port, boolean connected)
Constructor.

Marked as hidden so only system can create the instance.

hide

        mPort = port;
        mConnected = connected;
    
Methods Summary
public intdescribeContents()
Describes the kinds of special objects contained in this Parcelable's marshalled representation.

        return 0;
    
public intgetPort()
Returns the port number for which the event occurred.

return
port number

        return mPort;
    
public booleanisConnected()
Returns the connection status associated with this event

return
true if the device gets connected; otherwise false

        return mConnected;
    
public voidwriteToParcel(android.os.Parcel dest, int flags)
Flattens this object in to a Parcel.

param
dest The Parcel in which the object should be written.
param
flags Additional flags about how the object should be written. May be 0 or {@link Parcelable#PARCELABLE_WRITE_RETURN_VALUE}.

        dest.writeInt(mPort);
        dest.writeByte((byte) (mConnected ? 1 : 0));