Commit c7db9fb3 by aquilescanta Committed by Oliver Woodman

Deduplicate calls to maybeNotifyPlaybackInfoChanged

PiperOrigin-RevId: 374253036
parent 25b453a5
...@@ -545,7 +545,6 @@ import java.util.concurrent.atomic.AtomicBoolean; ...@@ -545,7 +545,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
default: default:
return false; return false;
} }
maybeNotifyPlaybackInfoChanged();
} catch (ExoPlaybackException e) { } catch (ExoPlaybackException e) {
if (e.type == ExoPlaybackException.TYPE_RENDERER) { if (e.type == ExoPlaybackException.TYPE_RENDERER) {
@Nullable MediaPeriodHolder readingPeriod = queue.getReadingPeriod(); @Nullable MediaPeriodHolder readingPeriod = queue.getReadingPeriod();
...@@ -571,7 +570,6 @@ import java.util.concurrent.atomic.AtomicBoolean; ...@@ -571,7 +570,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
stopInternal(/* forceResetRenderers= */ true, /* acknowledgeStop= */ false); stopInternal(/* forceResetRenderers= */ true, /* acknowledgeStop= */ false);
playbackInfo = playbackInfo.copyWithPlaybackError(e); playbackInfo = playbackInfo.copyWithPlaybackError(e);
} }
maybeNotifyPlaybackInfoChanged();
} catch (IOException e) { } catch (IOException e) {
ExoPlaybackException error = ExoPlaybackException.createForSource(e); ExoPlaybackException error = ExoPlaybackException.createForSource(e);
@Nullable MediaPeriodHolder playingPeriod = queue.getPlayingPeriod(); @Nullable MediaPeriodHolder playingPeriod = queue.getPlayingPeriod();
...@@ -582,14 +580,13 @@ import java.util.concurrent.atomic.AtomicBoolean; ...@@ -582,14 +580,13 @@ import java.util.concurrent.atomic.AtomicBoolean;
Log.e(TAG, "Playback error", error); Log.e(TAG, "Playback error", error);
stopInternal(/* forceResetRenderers= */ false, /* acknowledgeStop= */ false); stopInternal(/* forceResetRenderers= */ false, /* acknowledgeStop= */ false);
playbackInfo = playbackInfo.copyWithPlaybackError(error); playbackInfo = playbackInfo.copyWithPlaybackError(error);
maybeNotifyPlaybackInfoChanged();
} catch (RuntimeException e) { } catch (RuntimeException e) {
ExoPlaybackException error = ExoPlaybackException.createForUnexpected(e); ExoPlaybackException error = ExoPlaybackException.createForUnexpected(e);
Log.e(TAG, "Playback error", error); Log.e(TAG, "Playback error", error);
stopInternal(/* forceResetRenderers= */ true, /* acknowledgeStop= */ false); stopInternal(/* forceResetRenderers= */ true, /* acknowledgeStop= */ false);
playbackInfo = playbackInfo.copyWithPlaybackError(error); playbackInfo = playbackInfo.copyWithPlaybackError(error);
maybeNotifyPlaybackInfoChanged();
} }
maybeNotifyPlaybackInfoChanged();
return true; return true;
} }
......
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