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

Commit 1b8ddb4d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "MediaSession2: Revisit documentation of SessionCallback#onPostConnect()"

parents 0b69c75a c3855960
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -749,6 +749,10 @@ public class MediaSession2 implements AutoCloseable {
         * You can reject the connection by returning {@code null}. In that case, controller
         * receives {@link MediaController2.ControllerCallback#onDisconnected(MediaController2)}
         * and cannot be used.
         * <p>
         * The controller hasn't connected yet in this method, so calls to the controller
         * (e.g. {@link #sendSessionCommand}) would be ignored. Override {@link #onPostConnect} for
         * the custom initialization for the controller instead.
         *
         * @param session the session for this event
         * @param controller controller information.
@@ -763,6 +767,10 @@ public class MediaSession2 implements AutoCloseable {
        /**
         * Called immediately after a controller is connected. This is a convenient method to add
         * custom initialization between the session and a controller.
         * <p>
         * Note that calls to the controller (e.g. {@link #sendSessionCommand}) work here but don't
         * work in {@link #onConnect} because the controller hasn't connected yet in
         * {@link #onConnect}.
         *
         * @param session the session for this event
         * @param controller controller information.