2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 21:55:10 +00:00

Don't init with null

This commit is contained in:
Nicolas Fella
2018-12-24 17:39:21 +01:00
parent cb7c91d438
commit 9b743f1302

View File

@@ -206,7 +206,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
if (!isUpdate) {
//If it's an update, the other end should have the icon already: no need to extract it and create the payload again
try {
Bitmap appIcon = null;
Bitmap appIcon;
Context foreignContext = context.createPackageContext(statusBarNotification.getPackageName(), 0);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
appIcon = iconToBitmap(foreignContext, notification.getLargeIcon());