Methods Summary |
---|
public boolean | canConnect()Returns true if device can be connected to (not in use), false otherwise.
return mCanConnect;
|
public int | describeContents()
return 0;
|
public boolean | equals(android.hardware.display.WifiDisplay other)Returns true if the two displays have the same identity (address, name and alias).
This method does not compare the current status of the displays.
return other != null
&& mDeviceAddress.equals(other.mDeviceAddress)
&& mDeviceName.equals(other.mDeviceName)
&& Objects.equal(mDeviceAlias, other.mDeviceAlias);
|
public boolean | equals(java.lang.Object o)
return o instanceof WifiDisplay && equals((WifiDisplay)o);
|
public java.lang.String | getDeviceAddress()Gets the MAC address of the Wifi display device.
return mDeviceAddress;
|
public java.lang.String | getDeviceAlias()Gets the user-specified alias of the Wifi display device, or null if none.
The alias should be used in the UI whenever available. It is the value
provided by the user when renaming the device.
return mDeviceAlias;
|
public java.lang.String | getDeviceName()Gets the name of the Wifi display device.
return mDeviceName;
|
public java.lang.String | getFriendlyDisplayName()Gets the name to show in the UI.
Uses the device alias if available, otherwise uses the device name.
return mDeviceAlias != null ? mDeviceAlias : mDeviceName;
|
public boolean | hasSameAddress(android.hardware.display.WifiDisplay other)Returns true if the other display is not null and has the same address as this one.
Can be used to perform identity comparisons on displays ignoring properties
that might change during a connection such as the name or alias.
return other != null && mDeviceAddress.equals(other.mDeviceAddress);
|
public int | hashCode()
// The address on its own should be sufficiently unique for hashing purposes.
return mDeviceAddress.hashCode();
|
public boolean | isAvailable()Returns true if device is available, false otherwise.
return mIsAvailable;
|
public boolean | isRemembered()Returns true if device has been remembered, false otherwise.
return mIsRemembered;
|
public java.lang.String | toString()
String result = mDeviceName + " (" + mDeviceAddress + ")";
if (mDeviceAlias != null) {
result += ", alias " + mDeviceAlias;
}
result += ", isAvailable " + mIsAvailable + ", canConnect " + mCanConnect
+ ", isRemembered " + mIsRemembered;
return result;
|
public void | writeToParcel(android.os.Parcel dest, int flags)
dest.writeString(mDeviceAddress);
dest.writeString(mDeviceName);
dest.writeString(mDeviceAlias);
dest.writeInt(mIsAvailable ? 1 : 0);
dest.writeInt(mCanConnect ? 1 : 0);
dest.writeInt(mIsRemembered ? 1 : 0);
|