public final class WifiDisplayStatus extends Object implements Parcelable
This object is immutable.
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<WifiDisplayStatus> |
CREATOR |
static int |
DISPLAY_STATE_CONNECTED
Display state: Connected to active display.
|
static int |
DISPLAY_STATE_CONNECTING
Display state: Connecting to active display.
|
static int |
DISPLAY_STATE_NOT_CONNECTED
Display state: Not connected.
|
static int |
FEATURE_STATE_DISABLED
Feature state: Wifi display is disabled, probably because Wifi is disabled.
|
static int |
FEATURE_STATE_OFF
Feature state: Wifi display is turned off in settings.
|
static int |
FEATURE_STATE_ON
Feature state: Wifi display is turned on in settings.
|
static int |
FEATURE_STATE_UNAVAILABLE
Feature state: Wifi display is not available on this device.
|
static int |
SCAN_STATE_NOT_SCANNING
Scan state: Not currently scanning.
|
static int |
SCAN_STATE_SCANNING
Scan state: Currently scanning.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
WifiDisplayStatus() |
WifiDisplayStatus(int featureState,
int scanState,
int activeDisplayState,
WifiDisplay activeDisplay,
WifiDisplay[] displays,
WifiDisplaySessionInfo sessionInfo) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
WifiDisplay |
getActiveDisplay()
Gets the Wifi display that is currently active.
|
int |
getActiveDisplayState()
Get the state of the currently active display.
|
WifiDisplay[] |
getDisplays()
Gets the list of Wifi displays, returns a combined list of all available
Wifi displays as reported by the most recent scan, and all remembered
Wifi displays (not necessarily available at the time).
|
int |
getFeatureState()
Returns the state of the Wifi display feature on this device.
|
int |
getScanState()
Returns the current state of the Wifi display scan.
|
WifiDisplaySessionInfo |
getSessionInfo()
Gets the Wifi display session info (required for certification only)
|
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public static final int FEATURE_STATE_UNAVAILABLE
public static final int FEATURE_STATE_DISABLED
public static final int FEATURE_STATE_OFF
public static final int FEATURE_STATE_ON
public static final int SCAN_STATE_NOT_SCANNING
public static final int SCAN_STATE_SCANNING
public static final int DISPLAY_STATE_NOT_CONNECTED
public static final int DISPLAY_STATE_CONNECTING
public static final int DISPLAY_STATE_CONNECTED
public static final Parcelable.Creator<WifiDisplayStatus> CREATOR
public WifiDisplayStatus()
public WifiDisplayStatus(int featureState, int scanState, int activeDisplayState, WifiDisplay activeDisplay, WifiDisplay[] displays, WifiDisplaySessionInfo sessionInfo)
public int getFeatureState()
The value of this property reflects whether the device supports the Wifi display, whether it has been enabled by the user and whether the prerequisites for connecting to displays have been met.
public int getScanState()
SCAN_STATE_NOT_SCANNING
or SCAN_STATE_SCANNING
.public int getActiveDisplayState()
DISPLAY_STATE_NOT_CONNECTED
, DISPLAY_STATE_CONNECTING
,
or DISPLAY_STATE_CONNECTED
.public WifiDisplay getActiveDisplay()
public WifiDisplay[] getDisplays()
public WifiDisplaySessionInfo getSessionInfo()
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())