aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@users.noreply.github.com>2019-09-12 16:37:36 -0700
committerGitHub <noreply@github.com>2019-09-12 16:37:36 -0700
commit2c9056ac903ef4a87f714a66e12a0a43048a9154 (patch)
tree30b12539ba0cd5e6c72773821361d48536b3c8d3
parent166d395e3e5de223527fec96d8b17dd42ed9a991 (diff)
parent81284e05cce68edec9941e59c7f52c48ca67adb9 (diff)
downloaddsub-2c9056ac903ef4a87f714a66e12a0a43048a9154.tar.gz
dsub-2c9056ac903ef4a87f714a66e12a0a43048a9154.tar.bz2
dsub-2c9056ac903ef4a87f714a66e12a0a43048a9154.zip
Merge pull request #964 from Kakadua/audio-focus-lost
Bugfix for pause on losing focus
-rw-r--r--app/src/main/java/github/daneren2005/dsub/util/Util.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/util/Util.java b/app/src/main/java/github/daneren2005/dsub/util/Util.java
index 791fea91..c1581a26 100644
--- a/app/src/main/java/github/daneren2005/dsub/util/Util.java
+++ b/app/src/main/java/github/daneren2005/dsub/util/Util.java
@@ -1340,6 +1340,7 @@ public final class Util {
audioFocusRequest = new AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN)
.setAudioAttributes(playbackAttributes)
.setOnAudioFocusChangeListener(getAudioFocusChangeListener(context, audioManager))
+ .setWillPauseWhenDucked(true)
.build();
audioManager.requestAudioFocus(audioFocusRequest);
}