diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/GarminSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/GarminSupport.java index fc4a45ac5..77956bc93 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/GarminSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/GarminSupport.java @@ -240,7 +240,12 @@ public class GarminSupport extends AbstractBTLEDeviceSupport implements ICommuni } protected Bitmap getNotificationAttachmentBitmap(int notificationId) { - return BitmapFactory.decodeFile(getNotificationAttachmentPath(notificationId)); + final String picturePath = getNotificationAttachmentPath(notificationId); + final Bitmap bitmap = BitmapFactory.decodeFile(picturePath); + if (bitmap == null) { + LOG.warn("Failed to load bitmap for {} from {}", notificationId, picturePath); + } + return bitmap; } @Override diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/NotificationsHandler.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/NotificationsHandler.java index 84d1ee776..de2aebeed 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/NotificationsHandler.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/NotificationsHandler.java @@ -135,6 +135,7 @@ public class NotificationsHandler implements MessageHandler { return e; } } + LOG.warn("Failed to find notificationSpec in queue for {}", id); return null; } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/ProtocolBufferHandler.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/ProtocolBufferHandler.java index 72f9ee57b..31a2bf3c2 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/ProtocolBufferHandler.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/ProtocolBufferHandler.java @@ -370,7 +370,6 @@ public class ProtocolBufferHandler implements MessageHandler { final int notificationId = pictureRequest.getNotificationId(); final Bitmap bmp = deviceSupport.getNotificationAttachmentBitmap(notificationId); if (bmp == null) { - LOG.warn("Failed to find bitmap for notification id {}", notificationId); return null; }