resume playing only if the user unplugs via wired headset or bluetooth while episode in progress (#5611)

This commit is contained in:
Tony Tam 2021-12-28 11:14:19 -08:00 committed by GitHub
parent b25ed64250
commit 7cd813dc23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1532,8 +1532,8 @@ public class PlaybackService extends MediaBrowserServiceCompat {
*/ */
private void pauseIfPauseOnDisconnect() { private void pauseIfPauseOnDisconnect() {
Log.d(TAG, "pauseIfPauseOnDisconnect()"); Log.d(TAG, "pauseIfPauseOnDisconnect()");
transientPause = (mediaPlayer.getPlayerStatus() == PlayerStatus.PLAYING);
if (UserPreferences.isPauseOnHeadsetDisconnect() && !isCasting()) { if (UserPreferences.isPauseOnHeadsetDisconnect() && !isCasting()) {
transientPause = true;
mediaPlayer.pause(!UserPreferences.isPersistNotify(), false); mediaPlayer.pause(!UserPreferences.isPersistNotify(), false);
} }
} }