Loading media/apex/java/android/media/MediaSession2.java +8 −0 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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. Loading Loading
media/apex/java/android/media/MediaSession2.java +8 −0 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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. Loading