aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/github
diff options
context:
space:
mode:
authorPatrik <patrik@ptjwebben.se>2019-08-31 23:33:44 +0200
committerPatrik <patrik@ptjwebben.se>2019-08-31 23:33:44 +0200
commit81284e05cce68edec9941e59c7f52c48ca67adb9 (patch)
tree30b12539ba0cd5e6c72773821361d48536b3c8d3 /app/src/main/java/github
parent166d395e3e5de223527fec96d8b17dd42ed9a991 (diff)
downloaddsub-81284e05cce68edec9941e59c7f52c48ca67adb9.tar.gz
dsub-81284e05cce68edec9941e59c7f52c48ca67adb9.tar.bz2
dsub-81284e05cce68edec9941e59c7f52c48ca67adb9.zip
When loosing focus with TRANSIENT_MAY_DUCK the app would no longer run onAudioFocusChange
This fixes that
Diffstat (limited to 'app/src/main/java/github')
-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);
}