|
72 | 72 | * <h2>Custom commands</h2> |
73 | 73 | * |
74 | 74 | * Custom actions are sent to the session under the hood. You can receive them by overriding the |
75 | | - * session callback method {@link MediaSession.Callback#onCustomCommand(MediaSession, ControllerInfo |
76 | | - * controller, SessionCommand, Bundle)}. This is useful because starting with Android 13, the System |
77 | | - * UI notification sends commands directly to the session. So handling the custom commands on the |
78 | | - * session level allows you to handle them at the same callback for all API levels. |
| 75 | + * session callback method {@link MediaSession.Callback#onCustomCommand(MediaSession, |
| 76 | + * MediaSession.ControllerInfo, SessionCommand, Bundle)}. This is useful because starting with |
| 77 | + * Android 13, the System UI notification sends commands directly to the session. So handling the |
| 78 | + * custom commands on the session level allows you to handle them at the same callback for all API |
| 79 | + * levels. |
79 | 80 | * |
80 | 81 | * <h2>Drawables</h2> |
81 | 82 | * |
@@ -230,10 +231,10 @@ public final boolean handleCustomCommand(MediaSession session, String action, Bu |
230 | 231 | * <p>To make the custom layout and commands work, you need to {@linkplain |
231 | 232 | * MediaSession#setCustomLayout(List) set the custom layout of commands} and add the custom |
232 | 233 | * commands to the available commands when a controller {@linkplain |
233 | | - * MediaSession.Callback#onConnect(MediaSession, ControllerInfo) connects to the session}. |
234 | | - * Controllers that connect after you called {@link MediaSession#setCustomLayout(List)} need the |
235 | | - * custom command set in {@link MediaSession.Callback#onPostConnect(MediaSession, ControllerInfo)} |
236 | | - * also. |
| 234 | + * MediaSession.Callback#onConnect(MediaSession, MediaSession.ControllerInfo) connects to the |
| 235 | + * session}. Controllers that connect after you called {@link MediaSession#setCustomLayout(List)} |
| 236 | + * need the custom command set in {@link MediaSession.Callback#onPostConnect(MediaSession, |
| 237 | + * MediaSession.ControllerInfo)} also. |
237 | 238 | * |
238 | 239 | * @param playerCommands The available player commands. |
239 | 240 | * @param customLayout The {@linkplain MediaSession#setCustomLayout(List) custom layout of |
|
0 commit comments