summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJae Seo <jaeseo@google.com>2015-11-02 12:50:43 -0500
committerJae Seo <jaeseo@google.com>2015-11-03 21:07:06 -0500
commit2490f437a4111d64520f891b2c81685f8fae323c (patch)
tree7652d3369ec1f1193d24dfa1243a6bec2c74d008
parent64f7b8234092b309afea9e2e29460185b330342b (diff)
downloadandroid_frameworks_support-2490f437a4111d64520f891b2c81685f8fae323c.tar.gz
android_frameworks_support-2490f437a4111d64520f891b2c81685f8fae323c.tar.bz2
android_frameworks_support-2490f437a4111d64520f891b2c81685f8fae323c.zip
MediaBrowser: Publish the API
Bug: 22917960 Change-Id: Id550e257694c993ff0bedef91bd966b9098cbffe
-rw-r--r--v4/api/current.txt71
-rw-r--r--v4/java/android/support/v4/media/MediaBrowserCompat.java4
-rw-r--r--v4/java/android/support/v4/media/MediaBrowserServiceCompat.java1
3 files changed, 73 insertions, 3 deletions
diff --git a/v4/api/current.txt b/v4/api/current.txt
index 1d17a089b2..cb33a92a8e 100644
--- a/v4/api/current.txt
+++ b/v4/api/current.txt
@@ -1208,6 +1208,77 @@ package android.support.v4.hardware.fingerprint {
package android.support.v4.media {
+ public final class MediaBrowserCompat {
+ ctor public MediaBrowserCompat(android.content.Context, android.content.ComponentName, android.support.v4.media.MediaBrowserCompat.ConnectionCallback, android.os.Bundle);
+ method public void connect();
+ method public void disconnect();
+ method public android.os.Bundle getExtras();
+ method public void getItem(java.lang.String, android.support.v4.media.MediaBrowserCompat.ItemCallback);
+ method public java.lang.String getRoot();
+ method public android.content.ComponentName getServiceComponent();
+ method public android.support.v4.media.session.MediaSessionCompat.Token getSessionToken();
+ method public boolean isConnected();
+ method public void subscribe(java.lang.String, android.support.v4.media.MediaBrowserCompat.SubscriptionCallback);
+ method public void unsubscribe(java.lang.String);
+ }
+
+ public static class MediaBrowserCompat.ConnectionCallback {
+ ctor public MediaBrowserCompat.ConnectionCallback();
+ method public void onConnected();
+ method public void onConnectionFailed();
+ method public void onConnectionSuspended();
+ }
+
+ public static abstract class MediaBrowserCompat.ItemCallback {
+ ctor public MediaBrowserCompat.ItemCallback();
+ method public void onError(java.lang.String);
+ method public void onItemLoaded(android.support.v4.media.MediaBrowserCompat.MediaItem);
+ }
+
+ public static class MediaBrowserCompat.MediaItem implements android.os.Parcelable {
+ ctor public MediaBrowserCompat.MediaItem(android.support.v4.media.MediaDescriptionCompat, int);
+ method public int describeContents();
+ method public android.support.v4.media.MediaDescriptionCompat getDescription();
+ method public int getFlags();
+ method public java.lang.String getMediaId();
+ method public boolean isBrowsable();
+ method public boolean isPlayable();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.support.v4.media.MediaBrowserCompat.MediaItem> CREATOR;
+ field public static final int FLAG_BROWSABLE = 1; // 0x1
+ field public static final int FLAG_PLAYABLE = 2; // 0x2
+ }
+
+ public static abstract class MediaBrowserCompat.SubscriptionCallback {
+ ctor public MediaBrowserCompat.SubscriptionCallback();
+ method public void onChildrenLoaded(java.lang.String, java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>);
+ method public void onError(java.lang.String);
+ }
+
+ public abstract class MediaBrowserServiceCompat extends android.app.Service {
+ ctor public MediaBrowserServiceCompat();
+ method public void dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
+ method public android.support.v4.media.session.MediaSessionCompat.Token getSessionToken();
+ method public void notifyChildrenChanged(java.lang.String);
+ method public android.os.IBinder onBind(android.content.Intent);
+ method public abstract android.support.v4.media.MediaBrowserServiceCompat.BrowserRoot onGetRoot(java.lang.String, int, android.os.Bundle);
+ method public abstract void onLoadChildren(java.lang.String, android.support.v4.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem>>);
+ method public void onLoadItem(java.lang.String, android.support.v4.media.MediaBrowserServiceCompat.Result<android.support.v4.media.MediaBrowserCompat.MediaItem>);
+ method public void setSessionToken(android.support.v4.media.session.MediaSessionCompat.Token);
+ field public static final java.lang.String SERVICE_INTERFACE = "android.media.browse.MediaBrowserService";
+ }
+
+ public static final class MediaBrowserServiceCompat.BrowserRoot {
+ ctor public MediaBrowserServiceCompat.BrowserRoot(java.lang.String, android.os.Bundle);
+ method public android.os.Bundle getExtras();
+ method public java.lang.String getRootId();
+ }
+
+ public static class MediaBrowserServiceCompat.Result {
+ method public void detach();
+ method public void sendResult(T);
+ }
+
public final class MediaDescriptionCompat implements android.os.Parcelable {
method public int describeContents();
method public static android.support.v4.media.MediaDescriptionCompat fromMediaDescription(java.lang.Object);
diff --git a/v4/java/android/support/v4/media/MediaBrowserCompat.java b/v4/java/android/support/v4/media/MediaBrowserCompat.java
index d46dc65009..aaeb906029 100644
--- a/v4/java/android/support/v4/media/MediaBrowserCompat.java
+++ b/v4/java/android/support/v4/media/MediaBrowserCompat.java
@@ -32,6 +32,7 @@ import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.BundleCompat;
+import android.support.v4.media.session.MediaControllerCompat;
import android.support.v4.media.session.MediaSessionCompat;
import android.support.v4.os.ResultReceiver;
import android.support.v4.util.ArrayMap;
@@ -52,7 +53,6 @@ import static android.support.v4.media.MediaBrowserProtocol.*;
* This object is not thread-safe. All calls should happen on the thread on which the browser
* was constructed.
* </p>
- * @hide
*/
public final class MediaBrowserCompat {
private static final String TAG = "MediaBrowserCompat";
@@ -219,7 +219,7 @@ public final class MediaBrowserCompat {
* Flag: Indicates that the item is playable.
* <p>
* The id of this item may be passed to
- * {@link MediaController.TransportControls#playFromMediaId(String, Bundle)}
+ * {@link MediaControllerCompat.TransportControls#playFromMediaId(String, Bundle)}
* to start playing it.
* </p>
*/
diff --git a/v4/java/android/support/v4/media/MediaBrowserServiceCompat.java b/v4/java/android/support/v4/media/MediaBrowserServiceCompat.java
index c618e4bce5..e2363cd2d6 100644
--- a/v4/java/android/support/v4/media/MediaBrowserServiceCompat.java
+++ b/v4/java/android/support/v4/media/MediaBrowserServiceCompat.java
@@ -65,7 +65,6 @@ import static android.support.v4.media.MediaBrowserProtocol.*;
* &lt;/intent-filter>
* &lt;/service>
* </pre>
- * @hide
*/
public abstract class MediaBrowserServiceCompat extends Service {
private static final String TAG = "MediaBrowserServiceCompat";