aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github
diff options
context:
space:
mode:
authorKurt Hardin <kurthardin.dev@gmail.com>2012-09-14 15:27:33 -0700
committerKurt Hardin <kurthardin.dev@gmail.com>2012-09-14 15:27:33 -0700
commit4573e156e0026348e7cdaaa1747d633b5fef3ef7 (patch)
treefee7cd78055badfc0bf40791ae4e5a8b8c3b722a /subsonic-android/src/github
parent5df4f164d5bf2d983da92e18d6d7c2b66322fc42 (diff)
parent1f330ce8e20e55937a012176d748867fd7e36320 (diff)
downloaddsub-4573e156e0026348e7cdaaa1747d633b5fef3ef7.tar.gz
dsub-4573e156e0026348e7cdaaa1747d633b5fef3ef7.tar.bz2
dsub-4573e156e0026348e7cdaaa1747d633b5fef3ef7.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java5
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/util/compat/RemoteControlClientICS.java9
2 files changed, 7 insertions, 7 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index 128fe0f8..2de8eb46 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -439,8 +439,9 @@ public class DownloadServiceImpl extends Service implements DownloadService {
Util.hidePlayingNotification(this, this, handler);
}
- MusicDirectory.Entry currentSong = currentPlaying == null ? null: currentPlaying.getSong();
+ MusicDirectory.Entry currentSong = (currentPlaying == null) ? null: currentPlaying.getSong();
mRemoteControl.updateMetadata(this, currentSong);
+
}
@Override
@@ -666,10 +667,8 @@ public class DownloadServiceImpl extends Service implements DownloadService {
if (show) {
Util.showPlayingNotification(this, this, handler, currentPlaying.getSong());
- Log.d(TAG, "Showing");
} else if (hide) {
Util.hidePlayingNotification(this, this, handler);
- Log.d(TAG, "Hiding");
}
if (playerState == STARTED) {
diff --git a/subsonic-android/src/github/daneren2005/dsub/util/compat/RemoteControlClientICS.java b/subsonic-android/src/github/daneren2005/dsub/util/compat/RemoteControlClientICS.java
index 98c52694..c5b09876 100644
--- a/subsonic-android/src/github/daneren2005/dsub/util/compat/RemoteControlClientICS.java
+++ b/subsonic-android/src/github/daneren2005/dsub/util/compat/RemoteControlClientICS.java
@@ -53,10 +53,11 @@ public class RemoteControlClientICS extends RemoteControlClientHelper {
public void updateMetadata(final Context context, final MusicDirectory.Entry currentSong) {
// Update the remote controls
mRemoteControl.editMetadata(true)
- .putString(MediaMetadataRetriever.METADATA_KEY_ARTIST, currentSong == null ? null : currentSong.getArtist())
- .putString(MediaMetadataRetriever.METADATA_KEY_ALBUM, currentSong == null ? null : currentSong.getAlbum())
- .putString(MediaMetadataRetriever.METADATA_KEY_TITLE, currentSong == null ? null : currentSong.getTitle())
- .putLong(MediaMetadataRetriever.METADATA_KEY_DURATION, currentSong == null ? 0 : currentSong.getDuration())
+ .putString(MediaMetadataRetriever.METADATA_KEY_ARTIST, (currentSong == null) ? null : currentSong.getArtist())
+ .putString(MediaMetadataRetriever.METADATA_KEY_ALBUM, (currentSong == null) ? null : currentSong.getAlbum())
+ .putString(MediaMetadataRetriever.METADATA_KEY_TITLE, (currentSong) == null ? null : currentSong.getTitle())
+ .putLong(MediaMetadataRetriever.METADATA_KEY_DURATION, (currentSong == null) ?
+ 0 : ((currentSong.getDuration() == null) ? 0 : currentSong.getDuration()))
.apply();
if (currentSong == null) {
mRemoteControl.editMetadata(true)