Clarify if the music is paused in the notification text

This commit is contained in:
Christopher Eby committed 2010-02-22 17:11:28 -06:00
1 parent f01348fc01
commit 21bbd3844e
2 files changed
+9 -1

No files matched your search

+1
View File
@@ -10,6 +10,7 @@
<string name="open_player">Open Player</string>
<string name="stop_service">Stop Service</string>
<string name="connect_to_service">Connect to Service</string>
<string name="paused">(Paused)</string>
<string name="headset_only_title">Headset only</string>
<string name="headset_only_summary_on">Audio only plays when a headset is plugged in</string>
+8 -1
View File
@@ -371,6 +371,9 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
int oldState = mState;
mState = state;
mNotification = createNotification();
mNotificationManager.notify(NOTIFICATION_ID, mNotification);
int i = mWatchers.beginBroadcast();
while (--i != -1) {
try {
@@ -397,9 +400,13 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
{
Song song = getSong(0);
String title = song.title;
if (mState != STATE_PLAYING)
title += ' ' + getResources().getString(R.string.paused);
RemoteViews views = new RemoteViews(getPackageName(), R.layout.statusbar);
views.setImageViewResource(R.id.icon, R.drawable.status_icon);
views.setTextViewText(R.id.title, song.title);
views.setTextViewText(R.id.title, title);
views.setTextViewText(R.id.artist, song.artist);
Notification notification = new Notification();