Differential D17320 Diff 47108 src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java
Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java
Show First 20 Lines • Show All 226 Lines • ▼ Show 20 Line(s) | 208 | try { | |||
---|---|---|---|---|---|
227 | 227 | | |||
228 | if (appIcon != null) { | 228 | if (appIcon != null) { | ||
229 | ByteArrayOutputStream outStream = new ByteArrayOutputStream(); | 229 | ByteArrayOutputStream outStream = new ByteArrayOutputStream(); | ||
230 | appIcon.compress(Bitmap.CompressFormat.PNG, 90, outStream); | 230 | appIcon.compress(Bitmap.CompressFormat.PNG, 90, outStream); | ||
231 | byte[] bitmapData = outStream.toByteArray(); | 231 | byte[] bitmapData = outStream.toByteArray(); | ||
232 | 232 | | |||
233 | Log.e("PAYLOAD", "PAYLOAD: " + getChecksum(bitmapData)); | 233 | Log.e("PAYLOAD", "PAYLOAD: " + getChecksum(bitmapData)); | ||
234 | 234 | | |||
235 | np.setPayload(bitmapData); | 235 | np.setPayload(new NetworkPacket.Payload(bitmapData)); | ||
236 | 236 | | |||
237 | np.set("payloadHash", getChecksum(bitmapData)); | 237 | np.set("payloadHash", getChecksum(bitmapData)); | ||
238 | } | 238 | } | ||
239 | } catch (Exception e) { | 239 | } catch (Exception e) { | ||
240 | e.printStackTrace(); | 240 | e.printStackTrace(); | ||
241 | Log.e("NotificationsPlugin", "Error retrieving icon"); | 241 | Log.e("NotificationsPlugin", "Error retrieving icon"); | ||
242 | } | 242 | } | ||
243 | } else { | 243 | } else { | ||
▲ Show 20 Lines • Show All 348 Lines • Show Last 20 Lines |