MediaRouter: Add getDeviceType() to RouteInfo

Bug: 24777080
Change-Id: I5d7b44ec84371fbb9560578ece439e1a00dcdd50
This commit is contained in:
Insun Kang
2015-11-11 14:44:45 +09:00
parent dc89e079ce
commit 9dd66417ea
5 changed files with 77 additions and 0 deletions

View File

@@ -104,6 +104,7 @@ public final class MediaRouterClientState implements Parcelable {
public int volumeMax;
public int volumeHandling;
public int presentationDisplayId;
public @MediaRouter.RouteInfo.DeviceType int deviceType;
public RouteInfo(String id) {
this.id = id;
@@ -113,6 +114,7 @@ public final class MediaRouterClientState implements Parcelable {
playbackStream = -1;
volumeHandling = MediaRouter.RouteInfo.PLAYBACK_VOLUME_FIXED;
presentationDisplayId = -1;
deviceType = MediaRouter.RouteInfo.DEVICE_TYPE_UNKNOWN;
}
public RouteInfo(RouteInfo other) {
@@ -128,6 +130,7 @@ public final class MediaRouterClientState implements Parcelable {
volumeMax = other.volumeMax;
volumeHandling = other.volumeHandling;
presentationDisplayId = other.presentationDisplayId;
deviceType = other.deviceType;
}
RouteInfo(Parcel in) {
@@ -143,6 +146,7 @@ public final class MediaRouterClientState implements Parcelable {
volumeMax = in.readInt();
volumeHandling = in.readInt();
presentationDisplayId = in.readInt();
deviceType = in.readInt();
}
@Override
@@ -164,6 +168,7 @@ public final class MediaRouterClientState implements Parcelable {
dest.writeInt(volumeMax);
dest.writeInt(volumeHandling);
dest.writeInt(presentationDisplayId);
dest.writeInt(deviceType);
}
@Override
@@ -180,6 +185,7 @@ public final class MediaRouterClientState implements Parcelable {
+ ", volumeMax=" + volumeMax
+ ", volumeHandling=" + volumeHandling
+ ", presentationDisplayId=" + presentationDisplayId
+ ", deviceType=" + deviceType
+ " }";
}