diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-01-31 19:10:30 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-01-31 19:10:30 -0800 |
commit | 6f050cc0ba06b7331a2301af26d3376539168b64 (patch) | |
tree | ee5233780e8cbf22fe9cef4c14ddfaf86deab002 /subsonic-android | |
parent | 54822bb15abff1e882ea205361e32b3b01166c2c (diff) | |
parent | d200272df9a7753dbba058476349d49816fa0303 (diff) | |
download | dsub-6f050cc0ba06b7331a2301af26d3376539168b64.tar.gz dsub-6f050cc0ba06b7331a2301af26d3376539168b64.tar.bz2 dsub-6f050cc0ba06b7331a2301af26d3376539168b64.zip |
Merge master into Experimental
Diffstat (limited to 'subsonic-android')
4 files changed, 8 insertions, 5 deletions
diff --git a/subsonic-android/AndroidManifest.xml b/subsonic-android/AndroidManifest.xml index 0f915865..44609b37 100644 --- a/subsonic-android/AndroidManifest.xml +++ b/subsonic-android/AndroidManifest.xml @@ -2,8 +2,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="github.daneren2005.dsub"
android:installLocation="internalOnly"
- android:versionCode="35"
- android:versionName="3.7.2">
+ android:versionCode="36"
+ android:versionName="3.7.3">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index 7ca5e9b9..08ba4fda 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -795,6 +795,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { if(mediaPlayer != null && getPlayerState() == STARTED) { try { cachedPosition = mediaPlayer.getCurrentPosition(); + Util.broadcastNewTrackInfo(DownloadServiceImpl.this, currentPlaying.getSong()); } catch(Exception e) { executorService.shutdown(); } diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java index 130a00f6..6ff45dee 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java @@ -253,7 +253,7 @@ public class DownloadServiceLifecycleSupport { switch (state) { case TelephonyManager.CALL_STATE_RINGING: case TelephonyManager.CALL_STATE_OFFHOOK: - if (downloadService.getPlayerState() == PlayerState.STARTED) { + if (downloadService.getPlayerState() == PlayerState.STARTED && !downloadService.isJukeboxEnabled()) { resumeAfterCall = true; downloadService.pause(); } diff --git a/subsonic-android/src/github/daneren2005/dsub/util/Util.java b/subsonic-android/src/github/daneren2005/dsub/util/Util.java index 0b7118d0..bbbb0573 100644 --- a/subsonic-android/src/github/daneren2005/dsub/util/Util.java +++ b/subsonic-android/src/github/daneren2005/dsub/util/Util.java @@ -826,7 +826,7 @@ public final class Util { audioManager.requestAudioFocus(new OnAudioFocusChangeListener() { public void onAudioFocusChange(int focusChange) { DownloadServiceImpl downloadService = (DownloadServiceImpl)context; - if(focusChange == AudioManager.AUDIOFOCUS_LOSS_TRANSIENT || focusChange == AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) { + if((focusChange == AudioManager.AUDIOFOCUS_LOSS_TRANSIENT || focusChange == AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) && !downloadService.isJukeboxEnabled()) { if(downloadService.getPlayerState() == PlayerState.STARTED) { SharedPreferences prefs = getPreferences(context); int lossPref = Integer.parseInt(prefs.getString(Constants.PREFERENCES_KEY_TEMP_LOSS, "1")); @@ -846,7 +846,7 @@ public final class Util { lowerFocus = false; downloadService.setVolume(1.0f); } - } else if(focusChange == AudioManager.AUDIOFOCUS_LOSS) { + } else if(focusChange == AudioManager.AUDIOFOCUS_LOSS && !downloadService.isJukeboxEnabled()) { hasFocus = false; downloadService.pause(); audioManager.abandonAudioFocus(this); @@ -879,6 +879,7 @@ public final class Util { avrcpIntent.putExtra("id", (long) downloadService.getCurrentPlayingIndex()+1); avrcpIntent.putExtra("duration", (long) downloadService.getPlayerDuration()); avrcpIntent.putExtra("position", (long) downloadService.getPlayerPosition()); + avrcpIntent.putExtra("coverart", albumArtFile.getAbsolutePath()); } else { intent.putExtra("title", ""); intent.putExtra("artist", ""); @@ -892,6 +893,7 @@ public final class Util { avrcpIntent.putExtra("id", (long) 0); avrcpIntent.putExtra("duration", (long )0); avrcpIntent.putExtra("position", (long) 0); + avrcpIntent.putExtra("coverart", ""); } context.sendBroadcast(intent); |