Searched refs:commandCode (Results 1 - 14 of 14) sorted by relevance

/frameworks/support/media/src/main/java/androidx/media/
H A DSessionCommandGroup2.java83 * Adds a predefined command with given {@code commandCode} to this command group.
85 * @param commandCode A command code to add.
88 public void addCommand(int commandCode) { argument
89 if (commandCode == COMMAND_CODE_CUSTOM) {
92 mCommands.add(new SessionCommand2(commandCode));
143 * Removes a command from this group which matches given {@code commandCode}.
145 * @param commandCode A command code to find.
148 public void removeCommand(int commandCode) { argument
149 if (commandCode == COMMAND_CODE_CUSTOM) {
150 throw new IllegalArgumentException("commandCode should
173 hasCommand(int commandCode) argument
[all...]
H A DSessionCommand2.java337 * @param commandCode A command code for predefined command.
339 public SessionCommand2(int commandCode) { argument
340 if (commandCode == COMMAND_CODE_CUSTOM) {
341 throw new IllegalArgumentException("commandCode shouldn't be COMMAND_CODE_CUSTOM");
343 mCommandCode = commandCode;
H A DMediaSessionLegacyStub.java221 private boolean isAllowedCommand(ControllerInfo controller, int commandCode) { argument
226 return allowedCommands != null && allowedCommands.hasCommand(commandCode);
229 private void onCommand2(@NonNull IBinder caller, final int commandCode, argument
231 onCommand2Internal(caller, null, commandCode, runnable);
240 @Nullable final SessionCommand2 sessionCommand, final int commandCode,
259 if (!isAllowedCommand(controller, commandCode)) {
262 command = sCommandsForOnCommandRequest.get(commandCode);
239 onCommand2Internal(@onNull IBinder caller, @Nullable final SessionCommand2 sessionCommand, final int commandCode, @NonNull final Session2Runnable runnable) argument
H A DMediaSession2Stub.java188 final int commandCode = extras.getInt(ARGUMENT_COMMAND_CODE);
195 onCommand2(caller.asBinder(), commandCode, new Session2Runnable() {
198 switch (commandCode) {
435 private boolean isAllowedCommand(ControllerInfo controller, int commandCode) { argument
440 return allowedCommands != null && allowedCommands.hasCommand(commandCode);
443 private void onCommand2(@NonNull IBinder caller, final int commandCode, argument
445 onCommand2Internal(caller, null, commandCode, runnable);
454 @Nullable final SessionCommand2 sessionCommand, final int commandCode,
473 if (!isAllowedCommand(controller, commandCode)) {
476 command = sCommandsForOnCommandRequest.get(commandCode);
453 onCommand2Internal(@onNull IBinder caller, @Nullable final SessionCommand2 sessionCommand, final int commandCode, @NonNull final Session2Runnable runnable) argument
[all...]
H A DMediaController2ImplBase.java912 private void sendCommand(int commandCode) { argument
913 sendCommand(commandCode, null);
916 private void sendCommand(int commandCode, Bundle args) { argument
920 args.putInt(ARGUMENT_COMMAND_CODE, commandCode);
/frameworks/base/media/java/android/media/
H A DSessionCommandGroup2.java55 public void addCommand(int commandCode) { argument
67 public void removeCommand(int commandCode) { argument
H A DSessionCommand2.java276 public SessionCommand2(int commandCode) { argument
278 this, commandCode, null, null);
/frameworks/av/packages/MediaComponents/src/com/android/media/
H A DMediaSession2Stub.java145 private ControllerInfo getControllerIfAble(IMediaController2 caller, int commandCode) { argument
157 if (!allowedCommands.hasCommand(commandCode)) {
159 Log.d(TAG, "Controller isn't allowed for command " + commandCode);
212 int commandCode) {
219 if (!allowedCommands.hasCommand(commandCode)) {
221 Log.d(TAG, "Controller isn't allowed for command " + commandCode);
229 private void onCommand(@NonNull IMediaController2 caller, int commandCode, argument
232 final ControllerInfo controller = getControllerIfAble(caller, commandCode);
237 if (getControllerIfAble(caller, commandCode) == null) {
240 SessionCommand2 command = sCommandsForOnCommandRequest.get(commandCode);
211 getControllerBinderIfAble(ControllerInfo controller, int commandCode) argument
275 notifyAll(int commandCode, @NonNull NotifyRunnable runnable) argument
295 notify(@onNull ControllerInfo controller, int commandCode, @NonNull NotifyRunnable runnable) argument
486 sendTransportControlCommand(IMediaController2 caller, int commandCode, Bundle args) argument
[all...]
H A DIMediaSession2.aidl50 int commandCode, in Bundle args);
H A DMediaController2Impl.java280 IMediaSession2 getSessionBinderIfAble(int commandCode) { argument
282 if (!mAllowedCommands.hasCommand(commandCode)) {
284 Log.w(TAG, "Controller isn't allowed to call command, commandCode="
285 + commandCode);
386 private void sendTransportControlCommand(int commandCode) { argument
387 sendTransportControlCommand(commandCode, null);
390 private void sendTransportControlCommand(int commandCode, Bundle args) { argument
394 binder.sendTransportControlCommand(mControllerStub, commandCode, args);
H A DMediaSession2Impl.java989 public CommandImpl(SessionCommand2 instance, int commandCode) { argument
991 mCommandCode = commandCode;
/frameworks/support/media/src/androidTest/java/androidx/media/
H A DMediaSession2_PermissionTest.java121 private SessionCommandGroup2 createCommandGroupWith(int commandCode) { argument
123 commands.addCommand(new SessionCommand2(commandCode));
127 private SessionCommandGroup2 createCommandGroupWithout(int commandCode) { argument
130 commands.removeCommand(new SessionCommand2(commandCode));
134 private void testOnCommandRequest(int commandCode, PermissionTestRunnable runnable) argument
136 createSessionWithAllowedActions(createCommandGroupWith(commandCode));
141 assertEquals(commandCode, mCallback.mCommand.getCommandCode());
143 createSessionWithAllowedActions(createCommandGroupWithout(commandCode));
/frameworks/av/packages/MediaComponents/src/com/android/media/update/
H A DApiFactory.java108 SessionCommand2 instance, int commandCode, String action, Bundle extra) {
110 return new MediaSession2Impl.CommandImpl(instance, commandCode);
107 createMediaSession2Command( SessionCommand2 instance, int commandCode, String action, Bundle extra) argument
/frameworks/base/media/java/android/media/update/
H A DStaticProvider.java73 int commandCode, String action, Bundle extra);
72 createMediaSession2Command(SessionCommand2 instance, int commandCode, String action, Bundle extra) argument

Completed in 467 milliseconds