Commit cfcce9ae by tonihei Committed by Rohit Singh

Fix command check in MediaControllerImplBase

The command check for setDeviceMuted was wrong.

PiperOrigin-RevId: 502355332
parent a2a44cdc
......@@ -1468,7 +1468,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
@Override
public void setDeviceMuted(boolean muted) {
if (!isPlayerCommandAvailable(Player.COMMAND_SET_DEVICE_VOLUME)) {
if (!isPlayerCommandAvailable(Player.COMMAND_ADJUST_DEVICE_VOLUME)) {
return;
}
......
......@@ -1324,7 +1324,7 @@ import java.util.concurrent.ExecutionException;
queueSessionTaskWithPlayerCommand(
caller,
sequenceNumber,
COMMAND_SET_DEVICE_VOLUME,
COMMAND_ADJUST_DEVICE_VOLUME,
sendSessionResultSuccess(player -> player.setDeviceMuted(muted)));
}
......
......@@ -185,7 +185,8 @@ public class MediaSessionPermissionTest {
@Test
public void setDeviceMuted() throws Exception {
testOnCommandRequest(COMMAND_SET_DEVICE_VOLUME, controller -> controller.setDeviceMuted(true));
testOnCommandRequest(
COMMAND_ADJUST_DEVICE_VOLUME, controller -> controller.setDeviceMuted(true));
}
@Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment