diff --git a/api/current.txt b/api/current.txt
index f3c654cedee30..a80c27f82b23a 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -12324,6 +12324,7 @@ package android.media {
public static class MediaRouter.RouteInfo {
method public android.media.MediaRouter.RouteCategory getCategory();
+ method public java.lang.CharSequence getDescription();
method public android.media.MediaRouter.RouteGroup getGroup();
method public android.graphics.drawable.Drawable getIconDrawable();
method public java.lang.CharSequence getName();
@@ -12362,6 +12363,7 @@ package android.media {
public static class MediaRouter.UserRouteInfo extends android.media.MediaRouter.RouteInfo {
method public android.media.RemoteControlClient getRemoteControlClient();
+ method public void setDescription(java.lang.CharSequence);
method public void setIconDrawable(android.graphics.drawable.Drawable);
method public void setIconResource(int);
method public void setName(java.lang.CharSequence);
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 50fad5fb2843c..f282188878f8c 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3946,9 +3946,12 @@
+ * The route name identifies the destination represented by the route. + * It may be a user-supplied name, an alias, or device serial number. + *
+ * + * @return The user-visible name of a media route. This is the string presented * to users who may select this as the active route. */ public CharSequence getName() { return getName(sStatic.mResources); } - + /** - * Return the properly localized/resource selected name of this route. - * + * Return the properly localized/resource user-visible name of this route. + *+ * The route name identifies the destination represented by the route. + * It may be a user-supplied name, an alias, or device serial number. + *
+ * * @param context Context used to resolve the correct configuration to load - * @return The user-friendly name of the media route. This is the string presented + * @return The user-visible name of a media route. This is the string presented * to users who may select this as the active route. */ public CharSequence getName(Context context) { return getName(context.getResources()); } - + CharSequence getName(Resources res) { if (mNameResId != 0) { return mName = res.getText(mNameResId); @@ -1124,7 +1139,20 @@ public class MediaRouter { } /** - * @return The user-friendly status for a media route. This may include a description + * Gets the user-visible description of the route. + *+ * The route description describes the kind of destination represented by the route. + * It may be a user-supplied string, a model number or brand of device. + *
+ * + * @return The description of the route, or null if none. + */ + public CharSequence getDescription() { + return mDescription; + } + + /** + * @return The user-visible status for a media route. This may include a description * of the currently playing media, if available. */ public CharSequence getStatus() { @@ -1410,6 +1438,7 @@ public class MediaRouter { public String toString() { String supportedTypes = typesToString(getSupportedTypes()); return getClass().getSimpleName() + "{ name=" + getName() + + ", description=" + getDescription() + ", status=" + getStatus() + ", category=" + getCategory() + ", supportedTypes=" + supportedTypes + @@ -1445,6 +1474,11 @@ public class MediaRouter { /** * Set the user-visible name of this route. + *+ * The route name identifies the destination represented by the route. + * It may be a user-supplied name, an alias, or device serial number. + *
+ * * @param resId Resource ID of the name to display to the user to describe this route */ public void setName(int resId) { @@ -1453,6 +1487,20 @@ public class MediaRouter { routeUpdated(); } + /** + * Set the user-visible description of this route. + *+ * The route description describes the kind of destination represented by the route. + * It may be a user-supplied string, a model number or brand of device. + *
+ * + * @param description The description of the route, or null if none. + */ + public void setDescription(CharSequence description) { + mDescription = description; + routeUpdated(); + } + /** * Set the current user-visible status for this route. * @param status Status to display to the user to describe what the endpoint