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

Commit 65a2b88c authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add brief media_session cmd prompt help" into main

parents 7e87633e 209e664c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -67,7 +67,6 @@ public class MediaSession2Record extends MediaSessionRecordImpl {
        // The lock is required to prevent `Controller2Callback` from using partially initialized
        // `MediaSession2Record.this`.
        synchronized (mLock) {
            mUniqueId = sNextMediaSessionRecordId.getAndIncrement();
            mSessionToken = sessionToken;
            mService = service;
            mHandlerExecutor = new HandlerExecutor(new Handler(handlerLooper));
+0 −1
Original line number Diff line number Diff line
@@ -294,7 +294,6 @@ public class MediaSessionRecord extends MediaSessionRecordImpl implements IBinde
            Looper handlerLooper,
            int policies)
            throws RemoteException {
        mUniqueId = sNextMediaSessionRecordId.getAndIncrement();
        mOwnerPid = ownerPid;
        mOwnerUid = ownerUid;
        mUserId = userId;
+6 −2
Original line number Diff line number Diff line
@@ -34,8 +34,12 @@ import java.util.concurrent.atomic.AtomicInteger;
 */
public abstract class MediaSessionRecordImpl {

    static final AtomicInteger sNextMediaSessionRecordId = new AtomicInteger(1);
    int mUniqueId;
    private static final AtomicInteger sNextMediaSessionRecordId = new AtomicInteger(1);
    private final int mUniqueId;

    protected MediaSessionRecordImpl() {
        mUniqueId = sNextMediaSessionRecordId.getAndIncrement();
    }

    /**
     * Get the info for this session.
+4 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ public class MediaShellCommand extends ShellCommand {
        mWriter.println("       media_session list-sessions");
        mWriter.println("       media_session monitor <tag>");
        mWriter.println("       media_session volume [options]");
        mWriter.println("       media_session expire-temp-engaged-sessions");
        mWriter.println();
        mWriter.println("media_session dispatch: dispatch a media key to the system.");
        mWriter.println("                KEY may be: play, pause, play-pause, mute, headsethook,");
@@ -121,6 +122,9 @@ public class MediaShellCommand extends ShellCommand {
        mWriter.println("media_session monitor: monitor updates to the specified session.");
        mWriter.println("                       Use the tag from list-sessions.");
        mWriter.println("media_session volume:  " + VolumeCtrl.USAGE);
        mWriter.println("media_session expire-temp-engaged-sessions: Expires any ongoing");
        mWriter.println("                timers for media sessions in a temporary user-engaged");
        mWriter.println("                state.");
        mWriter.println();
    }