FileDocCategorySizeDatePackage
RemoteDisplay.javaAPI DocAndroid 5.1 API4994Thu Mar 12 22:22:30 GMT 2015com.android.media.remotedisplay

RemoteDisplay

public class RemoteDisplay extends Object
Represents a remote display that has been discovered.

Fields Summary
private final android.media.RemoteDisplayState.RemoteDisplayInfo
mMutableInfo
private android.media.RemoteDisplayState.RemoteDisplayInfo
mImmutableInfo
public static final int
STATUS_NOT_AVAILABLE
Status code: Indicates that the remote display is not available.
public static final int
STATUS_IN_USE
Status code: Indicates that the remote display is in use by someone else.
public static final int
STATUS_AVAILABLE
Status code: Indicates that the remote display is available for new connections.
public static final int
STATUS_CONNECTING
Status code: Indicates that the remote display is current connecting.
public static final int
STATUS_CONNECTED
Status code: Indicates that the remote display is connected and is mirroring display contents.
public static final int
PLAYBACK_VOLUME_VARIABLE
Volume handling: Output volume can be changed.
public static final int
PLAYBACK_VOLUME_FIXED
Volume handling: Output volume is fixed.
Constructors Summary
public RemoteDisplay(String id, String name)
Creates a remote display with the specified name and id.


                   
         
        if (TextUtils.isEmpty(id)) {
            throw new IllegalArgumentException("id must not be null or empty");
        }
        mMutableInfo = new RemoteDisplayInfo(id);
        setName(name);
    
Methods Summary
public java.lang.StringgetDescription()

        return mMutableInfo.description;
    
public java.lang.StringgetId()

        return mMutableInfo.id;
    
android.media.RemoteDisplayState.RemoteDisplayInfogetInfo()

        if (mImmutableInfo == null) {
            mImmutableInfo = new RemoteDisplayInfo(mMutableInfo);
        }
        return mImmutableInfo;
    
public java.lang.StringgetName()

        return mMutableInfo.name;
    
public intgetPresentationDisplayId()

        return mMutableInfo.presentationDisplayId;
    
public intgetStatus()

        return mMutableInfo.status;
    
public intgetVolume()

        return mMutableInfo.volume;
    
public intgetVolumeHandling()

        return mMutableInfo.volumeHandling;
    
public intgetVolumeMax()

        return mMutableInfo.volumeMax;
    
public voidsetDescription(java.lang.String description)

        if (!Objects.equals(mMutableInfo.description, description)) {
            mMutableInfo.description = description;
            mImmutableInfo = null;
        }
    
public voidsetName(java.lang.String name)

        if (!Objects.equals(mMutableInfo.name, name)) {
            mMutableInfo.name = name;
            mImmutableInfo = null;
        }
    
public voidsetPresentationDisplayId(int presentationDisplayId)

        if (mMutableInfo.presentationDisplayId != presentationDisplayId) {
            mMutableInfo.presentationDisplayId = presentationDisplayId;
            mImmutableInfo = null;
        }
    
public voidsetStatus(int status)

        if (mMutableInfo.status != status) {
            mMutableInfo.status = status;
            mImmutableInfo = null;
        }
    
public voidsetVolume(int volume)

        if (mMutableInfo.volume != volume) {
            mMutableInfo.volume = volume;
            mImmutableInfo = null;
        }
    
public voidsetVolumeHandling(int volumeHandling)

        if (mMutableInfo.volumeHandling != volumeHandling) {
            mMutableInfo.volumeHandling = volumeHandling;
            mImmutableInfo = null;
        }
    
public voidsetVolumeMax(int volumeMax)

        if (mMutableInfo.volumeMax != volumeMax) {
            mMutableInfo.volumeMax = volumeMax;
            mImmutableInfo = null;
        }
    
public java.lang.StringtoString()

        return "RemoteDisplay{" + mMutableInfo.toString() + "}";