mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
Remove deprecated usage of MediaSession APIs
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=209152304
This commit is contained in:
parent
b34c46415d
commit
0831f6cab3
3 changed files with 2 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue