From 253fffd035442574928dedb3b898ec6d69c11e8a Mon Sep 17 00:00:00 2001 From: owner Date: Mon, 31 Dec 2012 20:14:28 -0800 Subject: Pause when other players try to start playing --- subsonic-android/src/github/daneren2005/dsub/util/Util.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'subsonic-android') diff --git a/subsonic-android/src/github/daneren2005/dsub/util/Util.java b/subsonic-android/src/github/daneren2005/dsub/util/Util.java index 762a3db7..fd6a9b6d 100644 --- a/subsonic-android/src/github/daneren2005/dsub/util/Util.java +++ b/subsonic-android/src/github/daneren2005/dsub/util/Util.java @@ -806,6 +806,8 @@ public final class Util { lowerFocus = false; downloadService.setVolume(1.0f); } + } else if(focusChange == AudioManager.AUDIOFOCUS_LOSS) { + downloadService.pause(); } } }, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN); -- cgit v1.2.3