Loading api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -16256,6 +16256,7 @@ package android.media.browse { method public void disconnect(); method public android.os.Bundle getExtras(); method public android.net.Uri getRoot(); method public android.content.ComponentName getServiceComponent(); method public android.media.session.MediaSession.Token getSessionToken(); method public boolean isConnected(); method public void loadIcon(android.net.Uri, int, int, android.media.browse.MediaBrowser.IconCallback); Loading Loading @@ -16656,12 +16657,14 @@ package android.media.session { method public void adjustVolume(int, int); method public android.media.routing.MediaRouter.Delegate createMediaRouterDelegate(); method public boolean dispatchMediaButtonEvent(android.view.KeyEvent); method public android.os.Bundle getExtras(); method public long getFlags(); method public android.app.PendingIntent getLaunchActivity(); method public android.media.MediaMetadata getMetadata(); method public java.lang.String getPackageName(); method public android.media.session.PlaybackState getPlaybackState(); method public java.util.List<android.media.session.MediaSession.Track> getQueue(); method public java.lang.CharSequence getQueueTitle(); method public int getRatingType(); method public android.media.session.MediaSession.Token getSessionToken(); method public android.media.session.MediaController.TransportControls getTransportControls(); media/java/android/media/browse/MediaBrowser.java +14 −3 Original line number Diff line number Diff line Loading @@ -224,6 +224,17 @@ public final class MediaBrowser { return mState == CONNECT_STATE_CONNECTED; } /** * Gets the service component that the media browser is connected to. */ public @NonNull ComponentName getServiceComponent() { if (!isConnected()) { throw new IllegalStateException("getServiceComponent() called while not connected" + " (state=" + mState + ")"); } return mServiceComponent; } /** * Gets the root Uri. * <p> Loading @@ -234,7 +245,7 @@ public final class MediaBrowser { * @throws IllegalStateException if not connected. */ public @NonNull Uri getRoot() { if (mState != CONNECT_STATE_CONNECTED) { if (!isConnected()) { throw new IllegalStateException("getSessionToken() called while not connected (state=" + getStateLabel(mState) + ")"); } Loading @@ -247,7 +258,7 @@ public final class MediaBrowser { * @throws IllegalStateException if not connected. */ public @Nullable Bundle getExtras() { if (mState != CONNECT_STATE_CONNECTED) { if (!isConnected()) { throw new IllegalStateException("getExtras() called while not connected (state=" + getStateLabel(mState) + ")"); } Loading @@ -266,7 +277,7 @@ public final class MediaBrowser { * @throws IllegalStateException if not connected. */ public @NonNull MediaSession.Token getSessionToken() { if (mState != CONNECT_STATE_CONNECTED) { if (!isConnected()) { throw new IllegalStateException("getSessionToken() called while not connected (state=" + mState + ")"); } Loading media/java/android/media/session/MediaController.java +24 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,30 @@ public final class MediaController { return null; } /** * Get the queue title for this session. */ public @Nullable CharSequence getQueueTitle() { try { return mSessionBinder.getQueueTitle(); } catch (RemoteException e) { Log.wtf(TAG, "Error calling getQueueTitle", e); } return null; } /** * Get the extras for this session. */ public @Nullable Bundle getExtras() { try { return mSessionBinder.getExtras(); } catch (RemoteException e) { Log.wtf(TAG, "Error calling getExtras", e); } return null; } /** * Get the rating type supported by the session. One of: * <ul> Loading Loading
api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -16256,6 +16256,7 @@ package android.media.browse { method public void disconnect(); method public android.os.Bundle getExtras(); method public android.net.Uri getRoot(); method public android.content.ComponentName getServiceComponent(); method public android.media.session.MediaSession.Token getSessionToken(); method public boolean isConnected(); method public void loadIcon(android.net.Uri, int, int, android.media.browse.MediaBrowser.IconCallback); Loading Loading @@ -16656,12 +16657,14 @@ package android.media.session { method public void adjustVolume(int, int); method public android.media.routing.MediaRouter.Delegate createMediaRouterDelegate(); method public boolean dispatchMediaButtonEvent(android.view.KeyEvent); method public android.os.Bundle getExtras(); method public long getFlags(); method public android.app.PendingIntent getLaunchActivity(); method public android.media.MediaMetadata getMetadata(); method public java.lang.String getPackageName(); method public android.media.session.PlaybackState getPlaybackState(); method public java.util.List<android.media.session.MediaSession.Track> getQueue(); method public java.lang.CharSequence getQueueTitle(); method public int getRatingType(); method public android.media.session.MediaSession.Token getSessionToken(); method public android.media.session.MediaController.TransportControls getTransportControls();
media/java/android/media/browse/MediaBrowser.java +14 −3 Original line number Diff line number Diff line Loading @@ -224,6 +224,17 @@ public final class MediaBrowser { return mState == CONNECT_STATE_CONNECTED; } /** * Gets the service component that the media browser is connected to. */ public @NonNull ComponentName getServiceComponent() { if (!isConnected()) { throw new IllegalStateException("getServiceComponent() called while not connected" + " (state=" + mState + ")"); } return mServiceComponent; } /** * Gets the root Uri. * <p> Loading @@ -234,7 +245,7 @@ public final class MediaBrowser { * @throws IllegalStateException if not connected. */ public @NonNull Uri getRoot() { if (mState != CONNECT_STATE_CONNECTED) { if (!isConnected()) { throw new IllegalStateException("getSessionToken() called while not connected (state=" + getStateLabel(mState) + ")"); } Loading @@ -247,7 +258,7 @@ public final class MediaBrowser { * @throws IllegalStateException if not connected. */ public @Nullable Bundle getExtras() { if (mState != CONNECT_STATE_CONNECTED) { if (!isConnected()) { throw new IllegalStateException("getExtras() called while not connected (state=" + getStateLabel(mState) + ")"); } Loading @@ -266,7 +277,7 @@ public final class MediaBrowser { * @throws IllegalStateException if not connected. */ public @NonNull MediaSession.Token getSessionToken() { if (mState != CONNECT_STATE_CONNECTED) { if (!isConnected()) { throw new IllegalStateException("getSessionToken() called while not connected (state=" + mState + ")"); } Loading
media/java/android/media/session/MediaController.java +24 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,30 @@ public final class MediaController { return null; } /** * Get the queue title for this session. */ public @Nullable CharSequence getQueueTitle() { try { return mSessionBinder.getQueueTitle(); } catch (RemoteException e) { Log.wtf(TAG, "Error calling getQueueTitle", e); } return null; } /** * Get the extras for this session. */ public @Nullable Bundle getExtras() { try { return mSessionBinder.getExtras(); } catch (RemoteException e) { Log.wtf(TAG, "Error calling getExtras", e); } return null; } /** * Get the rating type supported by the session. One of: * <ul> Loading