mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 21:27:40 +00:00
Commented app icon sending code of notifications plugin
Because it was not used from desktop
This commit is contained in:
parent
87174cfb28
commit
4b3af91c71
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user