Commit 0831f6ca by olly Committed by Oliver Woodman

Remove deprecated usage of MediaSession APIs

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209152304
parent b34c4641
......@@ -839,7 +839,6 @@ public final class CastPlayer implements Player {
@Override
public void onAdBreakStatusUpdated() {}
// SessionManagerListener implementation.
@Override
......
......@@ -248,8 +248,6 @@ public final class MediaSessionConnector {
* description)}.
*/
void onRemoveQueueItem(Player player, MediaDescriptionCompat description);
/** See {@link MediaSessionCompat.Callback#onRemoveQueueItemAt(int index)}. */
void onRemoveQueueItemAt(Player player, int index);
}
/** Callback receiving a user rating for the active media item. */
......@@ -1022,12 +1020,5 @@ public final class MediaSessionConnector {
queueEditor.onRemoveQueueItem(player, description);
}
}
@Override
public void onRemoveQueueItemAt(int index) {
if (queueEditor != null) {
queueEditor.onRemoveQueueItemAt(player, index);
}
}
}
}
......@@ -184,18 +184,13 @@ public final class TimelineQueueEditor
List<MediaSessionCompat.QueueItem> queue = mediaController.getQueue();
for (int i = 0; i < queue.size(); i++) {
if (equalityChecker.equals(queue.get(i).getDescription(), description)) {
onRemoveQueueItemAt(player, i);
queueDataAdapter.remove(i);
queueMediaSource.removeMediaSource(i);
return;
}
}
}
@Override
public void onRemoveQueueItemAt(Player player, int index) {
queueDataAdapter.remove(index);
queueMediaSource.removeMediaSource(index);
}
// CommandReceiver implementation.
@NonNull
......
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