OSDN Git Service

MediaSession2: Change return type of CommandGroup#getCommands()
authorJaewan Kim <jaewan@google.com>
Tue, 20 Mar 2018 07:11:40 +0000 (16:11 +0900)
committerJaewan Kim <jaewan@google.com>
Mon, 26 Mar 2018 06:30:44 +0000 (15:30 +0900)
Bug: 74648408
Test: Build
Change-Id: I443dd0a1f244b285754561a4c485ef2e8530d42d

media/java/android/media/MediaSession2.java
media/java/android/media/update/MediaSession2Provider.java

index d902671..a462add 100644 (file)
@@ -45,6 +45,7 @@ import android.os.ResultReceiver;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.util.List;
+import java.util.Set;
 import java.util.concurrent.Executor;
 
 /**
@@ -535,7 +536,7 @@ public class MediaSession2 implements AutoCloseable {
             return mProvider.hasCommand_impl(code);
         }
 
-        public @NonNull List<Command> getCommands() {
+        public @NonNull Set<Command> getCommands() {
             return mProvider.getCommands_impl();
         }
 
index ed96b6d..5a1db3e 100644 (file)
@@ -36,6 +36,7 @@ import android.os.Bundle;
 import android.os.ResultReceiver;
 
 import java.util.List;
+import java.util.Set;
 import java.util.concurrent.Executor;
 
 /**
@@ -87,7 +88,7 @@ public interface MediaSession2Provider extends TransportControlProvider {
         void removeCommand_impl(Command command);
         boolean hasCommand_impl(Command command);
         boolean hasCommand_impl(int code);
-        List<Command> getCommands_impl();
+        Set<Command> getCommands_impl();
         Bundle toBundle_impl();
     }