Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23a42810 authored by RoboErik's avatar RoboErik Committed by Android (Google) Code Review
Browse files

Merge "Add getMediaSession to RCC"

parents b86b1027 5f31737c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -14979,6 +14979,7 @@ package android.media {
    ctor public RemoteControlClient(android.app.PendingIntent);
    ctor public RemoteControlClient(android.app.PendingIntent, android.os.Looper);
    method public android.media.RemoteControlClient.MetadataEditor editMetadata(boolean);
    method public android.media.session.MediaSession getMediaSession();
    method public void setMetadataUpdateListener(android.media.RemoteControlClient.OnMetadataUpdateListener);
    method public void setOnGetPlaybackPositionListener(android.media.RemoteControlClient.OnGetPlaybackPositionListener);
    method public void setPlaybackPositionUpdateListener(android.media.RemoteControlClient.OnPlaybackPositionUpdateListener);
+13 −0
Original line number Diff line number Diff line
@@ -406,6 +406,19 @@ public class RemoteControlClient
        mSession = null;
    }

    /**
     * Get a {@link MediaSession} associated with this RCC. It will only have a
     * session while it is registered with
     * {@link AudioManager#registerRemoteControlClient}. The session returned
     * should not be modified directly by the application but may be used with
     * other APIs that require a session.
     *
     * @return A media session object or null.
     */
    public MediaSession getMediaSession() {
        return mSession;
    }

    /**
     * Class used to modify metadata in a {@link RemoteControlClient} object.
     * Use {@link RemoteControlClient#editMetadata(boolean)} to create an instance of an editor,