Merge "MediaSession2: Change return type of CommandGroup#getCommands()" into pi-dev

This commit is contained in:
Jaewan Kim
2018-03-26 10:55:30 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 2 deletions

View File

@@ -45,6 +45,7 @@ import android.os.ResultReceiver;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.util.List; import java.util.List;
import java.util.Set;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
/** /**
@@ -557,7 +558,7 @@ public class MediaSession2 implements AutoCloseable {
return mProvider.hasCommand_impl(code); return mProvider.hasCommand_impl(code);
} }
public @NonNull List<Command> getCommands() { public @NonNull Set<Command> getCommands() {
return mProvider.getCommands_impl(); return mProvider.getCommands_impl();
} }

View File

@@ -36,6 +36,7 @@ import android.os.Bundle;
import android.os.ResultReceiver; import android.os.ResultReceiver;
import java.util.List; import java.util.List;
import java.util.Set;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
/** /**
@@ -87,7 +88,7 @@ public interface MediaSession2Provider extends TransportControlProvider {
void removeCommand_impl(Command command); void removeCommand_impl(Command command);
boolean hasCommand_impl(Command command); boolean hasCommand_impl(Command command);
boolean hasCommand_impl(int code); boolean hasCommand_impl(int code);
List<Command> getCommands_impl(); Set<Command> getCommands_impl();
Bundle toBundle_impl(); Bundle toBundle_impl();
} }