[Android] New notification icons

Geoffrey Métais git at videolan.org
Fri Jan 13 16:56:45 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan 13 16:56:07 2017 +0100| [54b37e04e8d3721896721a369bb58c78dcb9b927] | committer: Geoffrey Métais

New notification icons

> https://code.videolan.org/videolan/vlc-android/commit/54b37e04e8d3721896721a369bb58c78dcb9b927
---

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index be09ed4..17d1a3b 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -828,16 +828,18 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
                     metaData.getBitmap(MediaMetadataCompat.METADATA_KEY_ALBUM_ART) :
                     AudioUtil.getCover(this, getCurrentMedia(), 512);
             if (cover == null)
-                cover = BitmapFactory.decodeResource(VLCApplication.getAppContext().getResources(), R.drawable.icon);
+                cover = BitmapFactory.decodeResource(VLCApplication.getAppContext().getResources(), R.drawable.ic_no_media);
             Notification notification;
 
             //Watch notification dismissed
             PendingIntent piStop = PendingIntent.getBroadcast(this, 0,
                     new Intent(ACTION_REMOTE_STOP), PendingIntent.FLAG_UPDATE_CURRENT);
 
+            MediaWrapper mw = getCurrentMedia();
+            boolean video = mw != null && mw.hasFlag(MediaWrapper.MEDIA_FORCE_AUDIO);
             // add notification to status bar
             NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
-            builder.setSmallIcon(R.drawable.ic_stat_vlc)
+            builder.setSmallIcon(video ? R.drawable.ic_notif_video : R.drawable.ic_notif_audio)
                 .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
                 .setContentTitle(title)
                 .setContentText(getMediaDescription(artist, album))



More information about the Android mailing list