2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 13:47:41 +00:00

Commented app icon sending code of notifications plugin

Because it was not used from desktop
This commit is contained in:
Albert Vaca
2013-10-01 03:27:48 +02:00
parent 87174cfb28
commit 4b3af91c71

View File

@@ -185,21 +185,21 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
String packageName = statusBarNotification.getPackageName(); String packageName = statusBarNotification.getPackageName();
String appName = AppsHelper.appNameLookup(context, packageName); String appName = AppsHelper.appNameLookup(context, packageName);
//TODO: Add support for displaying app icons to desktop plasmoid and uncomment this piece of code
/*
try { try {
//TODO: Scale down app icon if too big and compress as JPG
Drawable drawableAppIcon = AppsHelper.appIconLookup(context, packageName); Drawable drawableAppIcon = AppsHelper.appIconLookup(context, packageName);
Bitmap appIcon = ImagesHelper.drawableToBitmap(drawableAppIcon); Bitmap appIcon = ImagesHelper.drawableToBitmap(drawableAppIcon);
ByteArrayOutputStream outStream = new ByteArrayOutputStream(); ByteArrayOutputStream outStream = new ByteArrayOutputStream();
appIcon.compress(Bitmap.CompressFormat.PNG, 90, outStream); appIcon.compress(Bitmap.CompressFormat.PNG, 90, outStream);
byte[] bitmapData = outStream.toByteArray(); 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); np.setPayload(bitmapData);
} catch(Exception e) { } catch(Exception e) {
e.printStackTrace(); e.printStackTrace();
Log.e("NotificationsPlugin","Error retrieving icon"); Log.e("NotificationsPlugin","Error retrieving icon");
} }
*/
np.set("id", id.serialize()); np.set("id", id.serialize());
np.set("appName", appName == null? packageName : appName); np.set("appName", appName == null? packageName : appName);