Methods Summary |
---|
public android.os.Bundle | asBundle()Converts this object to a bundle for serialization.
return mBundle;
|
private void | ensureSelector()
if (mSelector == null) {
mSelector = MediaRouteSelector.fromBundle(mBundle.getBundle(KEY_SELECTOR));
if (mSelector == null) {
mSelector = MediaRouteSelector.EMPTY;
}
}
|
public boolean | equals(java.lang.Object o)
if (o instanceof MediaRouteDiscoveryRequest) {
MediaRouteDiscoveryRequest other = (MediaRouteDiscoveryRequest)o;
return getSelector().equals(other.getSelector())
&& isActiveScan() == other.isActiveScan();
}
return false;
|
public static android.support.v7.media.MediaRouteDiscoveryRequest | fromBundle(android.os.Bundle bundle)Creates an instance from a bundle.
return bundle != null ? new MediaRouteDiscoveryRequest(bundle) : null;
|
public MediaRouteSelector | getSelector()Gets the route selector that specifies the kinds of routes to discover.
ensureSelector();
return mSelector;
|
public int | hashCode()
return getSelector().hashCode() ^ (isActiveScan() ? 1 : 0);
|
public boolean | isActiveScan()Returns true if active scanning should be performed.
return mBundle.getBoolean(KEY_ACTIVE_SCAN);
|
public boolean | isValid()Returns true if the discovery request has all of the required fields.
ensureSelector();
return mSelector.isValid();
|
public java.lang.String | toString()
StringBuilder result = new StringBuilder();
result.append("DiscoveryRequest{ selector=").append(getSelector());
result.append(", activeScan=").append(isActiveScan());
result.append(", isValid=").append(isValid());
result.append(" }");
return result.toString();
|