diff options
author | Antoine Cellerier <dionoea@videolan.org> | 2011-01-24 17:10:56 +0000 |
---|---|---|
committer | Antoine Cellerier <dionoea@videolan.org> | 2011-01-24 17:10:56 +0000 |
commit | ef980355c89787699b0ee43f448839d6753b7256 (patch) | |
tree | e8d04411b62d75d9caccf4e2ebc9b922659e5bcf /android | |
parent | a448d8bac7c97c008afcc0c435c7e9777c069b26 (diff) |
Move android notification display format logic to java code (no functional change, this is used by FS #11902).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29132 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'android')
-rw-r--r-- | android/src/org/rockbox/Helper/RunForegroundManager.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/android/src/org/rockbox/Helper/RunForegroundManager.java b/android/src/org/rockbox/Helper/RunForegroundManager.java index 513089ff9f..197c51a567 100644 --- a/android/src/org/rockbox/Helper/RunForegroundManager.java +++ b/android/src/org/rockbox/Helper/RunForegroundManager.java @@ -5,6 +5,7 @@ import java.lang.reflect.Method; import org.rockbox.R; import org.rockbox.RockboxActivity; +import org.rockbox.RockboxWidgetProvider; import android.app.Notification; import android.app.NotificationManager; @@ -82,12 +83,15 @@ public class RunForegroundManager api.stopForeground(); } - public void updateNotification(String title, String content, String ticker) + public void updateNotification(String title, String artist, String album) { RemoteViews views = mNotification.contentView; views.setTextViewText(R.id.title, title); - views.setTextViewText(R.id.content, content); - mNotification.tickerText = ticker; + views.setTextViewText(R.id.content, artist+"\n"+album); + if (artist.equals("")) + mNotification.tickerText = title; + else + mNotification.tickerText = title+" - "+artist; mNM.notify(R.string.notification, mNotification); } |