Clarify if the music is paused in the notification text
This commit is contained in:
parent
f01348fc01
commit
21bbd3844e
@ -10,6 +10,7 @@
|
|||||||
<string name="open_player">Open Player</string>
|
<string name="open_player">Open Player</string>
|
||||||
<string name="stop_service">Stop Service</string>
|
<string name="stop_service">Stop Service</string>
|
||||||
<string name="connect_to_service">Connect to 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_title">Headset only</string>
|
||||||
<string name="headset_only_summary_on">Audio only plays when a headset is plugged in</string>
|
<string name="headset_only_summary_on">Audio only plays when a headset is plugged in</string>
|
||||||
|
@ -371,6 +371,9 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
|
|||||||
int oldState = mState;
|
int oldState = mState;
|
||||||
mState = state;
|
mState = state;
|
||||||
|
|
||||||
|
mNotification = createNotification();
|
||||||
|
mNotificationManager.notify(NOTIFICATION_ID, mNotification);
|
||||||
|
|
||||||
int i = mWatchers.beginBroadcast();
|
int i = mWatchers.beginBroadcast();
|
||||||
while (--i != -1) {
|
while (--i != -1) {
|
||||||
try {
|
try {
|
||||||
@ -397,9 +400,13 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
|
|||||||
{
|
{
|
||||||
Song song = getSong(0);
|
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);
|
RemoteViews views = new RemoteViews(getPackageName(), R.layout.statusbar);
|
||||||
views.setImageViewResource(R.id.icon, R.drawable.status_icon);
|
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);
|
views.setTextViewText(R.id.artist, song.artist);
|
||||||
|
|
||||||
Notification notification = new Notification();
|
Notification notification = new Notification();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user