Loading api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -11566,6 +11566,8 @@ package android.media { method public java.lang.CharSequence getName(android.content.Context); method public java.lang.CharSequence getStatus(); method public int getSupportedTypes(); method public java.lang.Object getTag(); method public void setTag(java.lang.Object); } public static class MediaRouter.SimpleCallback extends android.media.MediaRouter.Callback { Loading @@ -11580,14 +11582,12 @@ package android.media { } public static class MediaRouter.UserRouteInfo extends android.media.MediaRouter.RouteInfo { method public java.lang.Object getTag(); method public void setIconDrawable(android.graphics.drawable.Drawable); method public void setIconResource(int); method public void setName(java.lang.CharSequence); method public void setName(int); method public void setRemoteControlClient(android.media.RemoteControlClient); method public void setStatus(java.lang.CharSequence); method public void setTag(java.lang.Object); } public class MediaScannerConnection implements android.content.ServiceConnection { core/java/com/android/internal/app/MediaRouteChooserDialogFragment.java +216 −322 File changed.Preview size limit exceeded, changes collapsed. Show changes core/res/res/layout/media_route_list_item_checkable.xml +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ <com.android.internal.view.CheckableLinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:background="?android:attr/selectableItemBackground" android:gravity="center_vertical"> <ImageView android:layout_width="56dp" Loading core/res/res/layout/media_route_list_item_collapse_group.xml +25 −20 Original line number Diff line number Diff line Loading @@ -14,7 +14,11 @@ limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?android:attr/selectableItemBackground"> <LinearLayout android:layout_width="match_parent" android:layout_height="?android:attr/listPreferredItemHeightSmall" android:background="#19ffffff" Loading @@ -37,3 +41,4 @@ android:scaleType="center" /> </LinearLayout> </FrameLayout> No newline at end of file media/java/android/media/MediaRouter.java +33 −25 Original line number Diff line number Diff line Loading @@ -271,9 +271,9 @@ public class MediaRouter { if (cat.isGroupable() && !(info instanceof RouteGroup)) { // Enforce that any added route in a groupable category must be in a group. final RouteGroup group = new RouteGroup(info.getCategory()); group.addRoute(info); sStatic.mRoutes.add(group); dispatchRouteAdded(group); group.addRoute(info); info = group; } else { Loading Loading @@ -552,6 +552,8 @@ public class MediaRouter { final RouteCategory mCategory; Drawable mIcon; private Object mTag; RouteInfo(RouteCategory category) { mCategory = category; } Loading Loading @@ -621,6 +623,29 @@ public class MediaRouter { return mIcon; } /** * Set an application-specific tag object for this route. * The application may use this to store arbitrary data associated with the * route for internal tracking. * * <p>Note that the lifespan of a route may be well past the lifespan of * an Activity or other Context; take care that objects you store here * will not keep more data in memory alive than you intend.</p> * * @param tag Arbitrary, app-specific data for this route to hold for later use */ public void setTag(Object tag) { mTag = tag; } /** * @return The tag object previously set by the application * @see #setTag(Object) */ public Object getTag() { return mTag; } void setStatusInt(CharSequence status) { if (!status.equals(mStatus)) { mStatus = status; Loading Loading @@ -652,7 +677,6 @@ public class MediaRouter { */ public static class UserRouteInfo extends RouteInfo { RemoteControlClient mRcc; private Object mTag; UserRouteInfo(RouteCategory category) { super(category); Loading Loading @@ -720,29 +744,6 @@ public class MediaRouter { public void setIconResource(int resId) { setIconDrawable(sStatic.mResources.getDrawable(resId)); } /** * Set an application-specific tag object for this route. * The application may use this to store arbitrary data associated with the * route for internal tracking. * * <p>Note that the lifespan of a route may be well past the lifespan of * an Activity or other Context; take care that objects you store here * will not keep more data in memory alive than you intend.</p> * * @param tag Arbitrary, app-specific data for this route to hold for later use */ public void setTag(Object tag) { mTag = tag; } /** * @return The tag object previously set by the application * @see #setTag(Object) */ public Object getTag() { return mTag; } } /** Loading Loading @@ -888,6 +889,12 @@ public class MediaRouter { void routeUpdated() { int types = 0; final int count = mRoutes.size(); if (count == 0) { // Don't keep empty groups in the router. MediaRouter.removeRoute(this); return; } for (int i = 0; i < count; i++) { types |= mRoutes.get(i).mSupportedTypes; } Loading @@ -901,6 +908,7 @@ public class MediaRouter { final int count = mRoutes.size(); for (int i = 0; i < count; i++) { final RouteInfo info = mRoutes.get(i); // TODO: There's probably a much more correct way to localize this. if (i > 0) sb.append(", "); sb.append(info.mName); } Loading Loading
api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -11566,6 +11566,8 @@ package android.media { method public java.lang.CharSequence getName(android.content.Context); method public java.lang.CharSequence getStatus(); method public int getSupportedTypes(); method public java.lang.Object getTag(); method public void setTag(java.lang.Object); } public static class MediaRouter.SimpleCallback extends android.media.MediaRouter.Callback { Loading @@ -11580,14 +11582,12 @@ package android.media { } public static class MediaRouter.UserRouteInfo extends android.media.MediaRouter.RouteInfo { method public java.lang.Object getTag(); method public void setIconDrawable(android.graphics.drawable.Drawable); method public void setIconResource(int); method public void setName(java.lang.CharSequence); method public void setName(int); method public void setRemoteControlClient(android.media.RemoteControlClient); method public void setStatus(java.lang.CharSequence); method public void setTag(java.lang.Object); } public class MediaScannerConnection implements android.content.ServiceConnection {
core/java/com/android/internal/app/MediaRouteChooserDialogFragment.java +216 −322 File changed.Preview size limit exceeded, changes collapsed. Show changes
core/res/res/layout/media_route_list_item_checkable.xml +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ <com.android.internal.view.CheckableLinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:background="?android:attr/selectableItemBackground" android:gravity="center_vertical"> <ImageView android:layout_width="56dp" Loading
core/res/res/layout/media_route_list_item_collapse_group.xml +25 −20 Original line number Diff line number Diff line Loading @@ -14,7 +14,11 @@ limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?android:attr/selectableItemBackground"> <LinearLayout android:layout_width="match_parent" android:layout_height="?android:attr/listPreferredItemHeightSmall" android:background="#19ffffff" Loading @@ -37,3 +41,4 @@ android:scaleType="center" /> </LinearLayout> </FrameLayout> No newline at end of file
media/java/android/media/MediaRouter.java +33 −25 Original line number Diff line number Diff line Loading @@ -271,9 +271,9 @@ public class MediaRouter { if (cat.isGroupable() && !(info instanceof RouteGroup)) { // Enforce that any added route in a groupable category must be in a group. final RouteGroup group = new RouteGroup(info.getCategory()); group.addRoute(info); sStatic.mRoutes.add(group); dispatchRouteAdded(group); group.addRoute(info); info = group; } else { Loading Loading @@ -552,6 +552,8 @@ public class MediaRouter { final RouteCategory mCategory; Drawable mIcon; private Object mTag; RouteInfo(RouteCategory category) { mCategory = category; } Loading Loading @@ -621,6 +623,29 @@ public class MediaRouter { return mIcon; } /** * Set an application-specific tag object for this route. * The application may use this to store arbitrary data associated with the * route for internal tracking. * * <p>Note that the lifespan of a route may be well past the lifespan of * an Activity or other Context; take care that objects you store here * will not keep more data in memory alive than you intend.</p> * * @param tag Arbitrary, app-specific data for this route to hold for later use */ public void setTag(Object tag) { mTag = tag; } /** * @return The tag object previously set by the application * @see #setTag(Object) */ public Object getTag() { return mTag; } void setStatusInt(CharSequence status) { if (!status.equals(mStatus)) { mStatus = status; Loading Loading @@ -652,7 +677,6 @@ public class MediaRouter { */ public static class UserRouteInfo extends RouteInfo { RemoteControlClient mRcc; private Object mTag; UserRouteInfo(RouteCategory category) { super(category); Loading Loading @@ -720,29 +744,6 @@ public class MediaRouter { public void setIconResource(int resId) { setIconDrawable(sStatic.mResources.getDrawable(resId)); } /** * Set an application-specific tag object for this route. * The application may use this to store arbitrary data associated with the * route for internal tracking. * * <p>Note that the lifespan of a route may be well past the lifespan of * an Activity or other Context; take care that objects you store here * will not keep more data in memory alive than you intend.</p> * * @param tag Arbitrary, app-specific data for this route to hold for later use */ public void setTag(Object tag) { mTag = tag; } /** * @return The tag object previously set by the application * @see #setTag(Object) */ public Object getTag() { return mTag; } } /** Loading Loading @@ -888,6 +889,12 @@ public class MediaRouter { void routeUpdated() { int types = 0; final int count = mRoutes.size(); if (count == 0) { // Don't keep empty groups in the router. MediaRouter.removeRoute(this); return; } for (int i = 0; i < count; i++) { types |= mRoutes.get(i).mSupportedTypes; } Loading @@ -901,6 +908,7 @@ public class MediaRouter { final int count = mRoutes.size(); for (int i = 0; i < count; i++) { final RouteInfo info = mRoutes.get(i); // TODO: There's probably a much more correct way to localize this. if (i > 0) sb.append(", "); sb.append(info.mName); } Loading