mirror of
https://github.com/androidx/media.git
synced 2025-05-21 23:56:32 +08:00
Merge #5126: fix(playlist): always call onCompletion when moving media sources
Imported from GitHub PR https://github.com/google/ExoPlayer/pull/5126 Closes #5125 Merge 55a4c1e15de7f100f37e38119f1da360910fd1e3 into fe41f17c387b7c18a818c8cf2a1ebcdfbd36836a PiperOrigin-RevId: 222612873
This commit is contained in:
parent
3039c358cc
commit
e99c904179
@ -365,6 +365,9 @@ public class ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHo
|
||||
public final synchronized void moveMediaSource(
|
||||
int currentIndex, int newIndex, @Nullable Runnable actionOnCompletion) {
|
||||
if (currentIndex == newIndex) {
|
||||
if (actionOnCompletion != null) {
|
||||
actionOnCompletion.run();
|
||||
}
|
||||
return;
|
||||
}
|
||||
mediaSourcesPublic.add(newIndex, mediaSourcesPublic.remove(currentIndex));
|
||||
|
Loading…
x
Reference in New Issue
Block a user