mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-24 09:35:50 +01:00
Garmin: Improve logging if notification picture is not found
This commit is contained in:
parent
fab6a7bc7f
commit
ee8eeaf16f
@ -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
|
||||
|
@ -135,6 +135,7 @@ public class NotificationsHandler implements MessageHandler {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
LOG.warn("Failed to find notificationSpec in queue for {}", id);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user