@Test public void testRemovePlaylistItem() throws InterruptedException { prepareLooper(); mMockAgent.mPlaylist = TestUtils.createPlaylist(2); MediaController2 controller = createController(mSession.getToken()); MediaItem2 targetItem = controller.getPlaylist().get(0); controller.removePlaylistItem(targetItem); assertTrue(mMockAgent.mCountDownLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); assertTrue(mMockAgent.mRemovePlaylistItemCalled); assertEquals(targetItem, mMockAgent.mItem); }
public void removePlaylistItem(@NonNull MediaItem2 item) { mImpl.removePlaylistItem(item); }
MediaController2 implements AutoCloseable { public void removePlaylistItem(@NonNull MediaItem2 item) { mImpl.removePlaylistItem(item); } }
MediaController2 implements AutoCloseable { public void removePlaylistItem(@NonNull MediaItem2 item) { mImpl.removePlaylistItem(item); } MediaController2(@NonNull Context context, @NonNull SessionToken2 token,
            @NonNull Executor executor, @NonNull ControllerCallback callback); }
MediaController2 implements AutoCloseable { public void removePlaylistItem(@NonNull MediaItem2 item) { mImpl.removePlaylistItem(item); } MediaController2(@NonNull Context context, @NonNull SessionToken2 token,
            @NonNull Executor executor, @NonNull ControllerCallback callback); @Override void close(); @NonNull SessionToken2 getSessionToken(); boolean isConnected(); void play(); void pause(); void reset(); void prepare(); void fastForward(); void rewind(); void seekTo(long pos); @RestrictTo(LIBRARY_GROUP) void skipForward(); @RestrictTo(LIBRARY_GROUP) void skipBackward(); void playFromMediaId(@NonNull String mediaId, @Nullable Bundle extras); void playFromSearch(@NonNull String query, @Nullable Bundle extras); void playFromUri(@NonNull Uri uri, @Nullable Bundle extras); void prepareFromMediaId(@NonNull String mediaId, @Nullable Bundle extras); void prepareFromSearch(@NonNull String query, @Nullable Bundle extras); void prepareFromUri(@NonNull Uri uri, @Nullable Bundle extras); void setVolumeTo(int value, @VolumeFlags int flags); void adjustVolume(@VolumeDirection int direction, @VolumeFlags int flags); @Nullable PendingIntent getSessionActivity(); int getPlayerState(); long getDuration(); long getCurrentPosition(); float getPlaybackSpeed(); void setPlaybackSpeed(float speed); @MediaPlayerInterface.BuffState int getBufferingState(); long getBufferedPosition(); @Nullable PlaybackInfo getPlaybackInfo(); void setRating(@NonNull String mediaId, @NonNull Rating2 rating); void sendCustomCommand(@NonNull SessionCommand2 command, @Nullable Bundle args,
            @Nullable ResultReceiver cb); @Nullable List<MediaItem2> getPlaylist(); void setPlaylist(@NonNull List<MediaItem2> list, @Nullable MediaMetadata2 metadata); void updatePlaylistMetadata(@Nullable MediaMetadata2 metadata); @Nullable MediaMetadata2 getPlaylistMetadata(); void addPlaylistItem(int index, @NonNull MediaItem2 item); void removePlaylistItem(@NonNull MediaItem2 item); void replacePlaylistItem(int index, @NonNull MediaItem2 item); MediaItem2 getCurrentMediaItem(); void skipToPreviousItem(); void skipToNextItem(); void skipToPlaylistItem(@NonNull MediaItem2 item); @RepeatMode int getRepeatMode(); void setRepeatMode(@RepeatMode int repeatMode); @ShuffleMode int getShuffleMode(); void setShuffleMode(@ShuffleMode int shuffleMode); void subscribeRoutesInfo(); void unsubscribeRoutesInfo(); void selectRoute(@NonNull Bundle route); }
MediaController2 implements AutoCloseable { public void removePlaylistItem(@NonNull MediaItem2 item) { mImpl.removePlaylistItem(item); } MediaController2(@NonNull Context context, @NonNull SessionToken2 token,
            @NonNull Executor executor, @NonNull ControllerCallback callback); @Override void close(); @NonNull SessionToken2 getSessionToken(); boolean isConnected(); void play(); void pause(); void reset(); void prepare(); void fastForward(); void rewind(); void seekTo(long pos); @RestrictTo(LIBRARY_GROUP) void skipForward(); @RestrictTo(LIBRARY_GROUP) void skipBackward(); void playFromMediaId(@NonNull String mediaId, @Nullable Bundle extras); void playFromSearch(@NonNull String query, @Nullable Bundle extras); void playFromUri(@NonNull Uri uri, @Nullable Bundle extras); void prepareFromMediaId(@NonNull String mediaId, @Nullable Bundle extras); void prepareFromSearch(@NonNull String query, @Nullable Bundle extras); void prepareFromUri(@NonNull Uri uri, @Nullable Bundle extras); void setVolumeTo(int value, @VolumeFlags int flags); void adjustVolume(@VolumeDirection int direction, @VolumeFlags int flags); @Nullable PendingIntent getSessionActivity(); int getPlayerState(); long getDuration(); long getCurrentPosition(); float getPlaybackSpeed(); void setPlaybackSpeed(float speed); @MediaPlayerInterface.BuffState int getBufferingState(); long getBufferedPosition(); @Nullable PlaybackInfo getPlaybackInfo(); void setRating(@NonNull String mediaId, @NonNull Rating2 rating); void sendCustomCommand(@NonNull SessionCommand2 command, @Nullable Bundle args,
            @Nullable ResultReceiver cb); @Nullable List<MediaItem2> getPlaylist(); void setPlaylist(@NonNull List<MediaItem2> list, @Nullable MediaMetadata2 metadata); void updatePlaylistMetadata(@Nullable MediaMetadata2 metadata); @Nullable MediaMetadata2 getPlaylistMetadata(); void addPlaylistItem(int index, @NonNull MediaItem2 item); void removePlaylistItem(@NonNull MediaItem2 item); void replacePlaylistItem(int index, @NonNull MediaItem2 item); MediaItem2 getCurrentMediaItem(); void skipToPreviousItem(); void skipToNextItem(); void skipToPlaylistItem(@NonNull MediaItem2 item); @RepeatMode int getRepeatMode(); void setRepeatMode(@RepeatMode int repeatMode); @ShuffleMode int getShuffleMode(); void setShuffleMode(@ShuffleMode int shuffleMode); void subscribeRoutesInfo(); void unsubscribeRoutesInfo(); void selectRoute(@NonNull Bundle route);  }