Commit 29eebca5 by aquilescanta Committed by Oliver Woodman

Fix section comments in CastPlayer

PiperOrigin-RevId: 273270892
parent a8adb97b
...@@ -771,8 +771,26 @@ public final class CastPlayer extends BasePlayer { ...@@ -771,8 +771,26 @@ public final class CastPlayer extends BasePlayer {
} }
} }
private final class StatusListener implements RemoteMediaClient.Listener, private void flushNotifications() {
SessionManagerListener<CastSession>, RemoteMediaClient.ProgressListener { boolean recursiveNotification = !ongoingNotificationsTasks.isEmpty();
ongoingNotificationsTasks.addAll(notificationsBatch);
notificationsBatch.clear();
if (recursiveNotification) {
// This will be handled once the current notification task is finished.
return;
}
while (!ongoingNotificationsTasks.isEmpty()) {
ongoingNotificationsTasks.peekFirst().execute();
ongoingNotificationsTasks.removeFirst();
}
}
// Internal classes.
private final class StatusListener
implements RemoteMediaClient.Listener,
SessionManagerListener<CastSession>,
RemoteMediaClient.ProgressListener {
// RemoteMediaClient.ProgressListener implementation. // RemoteMediaClient.ProgressListener implementation.
...@@ -856,24 +874,6 @@ public final class CastPlayer extends BasePlayer { ...@@ -856,24 +874,6 @@ public final class CastPlayer extends BasePlayer {
} }
// Internal methods.
private void flushNotifications() {
boolean recursiveNotification = !ongoingNotificationsTasks.isEmpty();
ongoingNotificationsTasks.addAll(notificationsBatch);
notificationsBatch.clear();
if (recursiveNotification) {
// This will be handled once the current notification task is finished.
return;
}
while (!ongoingNotificationsTasks.isEmpty()) {
ongoingNotificationsTasks.peekFirst().execute();
ongoingNotificationsTasks.removeFirst();
}
}
// Internal classes.
private final class SeekResultCallback implements ResultCallback<MediaChannelResult> { private final class SeekResultCallback implements ResultCallback<MediaChannelResult> {
@Override @Override
......
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