From f52e4bed3d9bcde9fb380855c54c437b22b98b6f Mon Sep 17 00:00:00 2001 From: olly Date: Mon, 15 Feb 2021 12:37:15 +0000 Subject: [PATCH] Don't clear audioSessionId when audio disabled Issue: #8585 #minor-release PiperOrigin-RevId: 357553237 --- RELEASENOTES.md | 3 +++ .../java/com/google/android/exoplayer2/SimpleExoPlayer.java | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index d7fa719b4ba..9906d377fa9 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -6,6 +6,9 @@ * Add support for MP4 and QuickTime meta atoms that are not full atoms. * UI: * Add builder for `PlayerNotificationManager`. +* Audio: + * Fix `SimpleExoPlayer` reporting audio session ID as 0 in some cases + ([#8585](https://github.com/google/ExoPlayer/issues/8585)). * Library restructuring: * `DebugTextViewHelper` moved from `ui` package to `util` package. * Spherical UI components moved from `video.spherical` package to diff --git a/library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java b/library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java index e89e05eb646..a98e3475af3 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java @@ -2140,7 +2140,6 @@ public void onAudioDisabled(DecoderCounters counters) { analyticsCollector.onAudioDisabled(counters); audioFormat = null; audioDecoderCounters = null; - audioSessionId = C.AUDIO_SESSION_ID_UNSET; } @Override