From f7b322da49759d96d54ebfd38bd1b7a1672c6f78 Mon Sep 17 00:00:00 2001 From: Mauricio Colli Date: Wed, 2 Aug 2017 14:14:45 -0300 Subject: [PATCH] Fix audio focus bug --- app/src/main/java/org/schabi/newpipe/player/BasePlayer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 31caddca5..10f4feb48 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -519,7 +519,7 @@ public abstract class BasePlayer implements ExoPlayer.EventListener, AudioManage } if (!isPlaying()) audioManager.requestAudioFocus(this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN); - else audioManager.abandonAudioFocus(null); + else audioManager.abandonAudioFocus(this); simpleExoPlayer.setPlayWhenReady(!isPlaying()); }