From 4b3af91c711a8a66b2e3f13600cafa97dc0a83d1 Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Tue, 1 Oct 2013 03:27:48 +0200 Subject: [PATCH] Commented app icon sending code of notifications plugin Because it was not used from desktop --- .../Plugins/NotificationsPlugin/NotificationsPlugin.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/KdeConnect/src/main/java/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java b/KdeConnect/src/main/java/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java index b524ed7a..96f32f6b 100644 --- a/KdeConnect/src/main/java/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java +++ b/KdeConnect/src/main/java/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java @@ -185,21 +185,21 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver. String packageName = statusBarNotification.getPackageName(); String appName = AppsHelper.appNameLookup(context, packageName); + //TODO: Add support for displaying app icons to desktop plasmoid and uncomment this piece of code + /* try { + //TODO: Scale down app icon if too big and compress as JPG Drawable drawableAppIcon = AppsHelper.appIconLookup(context, packageName); Bitmap appIcon = ImagesHelper.drawableToBitmap(drawableAppIcon); ByteArrayOutputStream outStream = new ByteArrayOutputStream(); appIcon.compress(Bitmap.CompressFormat.PNG, 90, outStream); byte[] bitmapData = outStream.toByteArray(); - //byte[] serializedBitmapData = Base64.encode(bitmapData, Base64.NO_WRAP); - //String stringBitmapData = new String(serializedBitmapData, Charset.defaultCharset()); - //The icon is super big, better sending it as a file transfer when we support that - //np.set("base64icon", stringBitmapData); np.setPayload(bitmapData); } catch(Exception e) { e.printStackTrace(); Log.e("NotificationsPlugin","Error retrieving icon"); } + */ np.set("id", id.serialize()); np.set("appName", appName == null? packageName : appName);