Commit caa0a09c by tonihei Committed by Ian Baker

Finish pending session if there is one before creating a new one.

PiperOrigin-RevId: 423819515
parent 6af74e7f
......@@ -16,7 +16,6 @@
package com.google.android.exoplayer2.analytics;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import static com.google.android.exoplayer2.util.Assertions.checkState;
import static com.google.android.exoplayer2.util.Util.castNonNull;
import android.annotation.SuppressLint;
......@@ -172,7 +171,7 @@ public final class MediaMetricsListener
// Ignore ad sessions.
return;
}
checkState(activeSessionId == null);
finishCurrentSession();
activeSessionId = sessionId;
metricsBuilder =
new PlaybackMetrics.Builder()
......
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