File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
wear/src/main/java/com/atomjack/wear Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,15 @@ public void onMessageReceived(MessageEvent messageEvent) {
101
101
intent .addFlags (Intent .FLAG_ACTIVITY_NEW_TASK );
102
102
startActivity (intent );
103
103
} else if (message .equals (WearConstants .MEDIA_STOPPED )) {
104
+ nowPlayingMedia = new DataMap ();
104
105
mNotifyMgr .cancel (NOTIFICATION_ID );
105
106
} else if (message .equals (WearConstants .MEDIA_PLAYING ) || message .equals (WearConstants .MEDIA_PAUSED )) {
106
107
if (dataMap .getBoolean (WearConstants .LAUNCHED , false )) {
107
108
finishMain ();
108
109
}
110
+ // First, remove previous title and subtitle, if there are any
111
+ nowPlayingMedia .remove (WearConstants .MEDIA_TITLE );
112
+ nowPlayingMedia .remove (WearConstants .MEDIA_SUBTITLE );
109
113
nowPlayingMedia = WearApplication .getInstance ().nowPlayingMedia ;
110
114
nowPlayingMedia .putAll (dataMap );
111
115
nowPlayingMedia .putString (WearConstants .PLAYBACK_STATE , message .equals (WearConstants .MEDIA_PLAYING ) ? PlayerState .PLAYING .name () : PlayerState .PAUSED .name ());
You can’t perform that action at this time.
0 commit comments