Skip to content

Commit fb18abf

Browse files
Muellerminbi
authored andcommitted
Make all Pinpoint notificiations expandable
1 parent ecb67fa commit fb18abf

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

aws-android-sdk-pinpoint/src/main/java/com/amazonaws/mobileconnectors/pinpoint/targeting/notification/NotificationClientBase.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -616,20 +616,21 @@ private Notification createNotification(final int iconResId, final String title,
616616
if (imageUrl != null) {
617617
try {
618618
notificationImage = new DownloadImageTask().execute(imageUrl).get();
619-
if (notificationImage != null) {
620-
bigPictureMethod.invoke(bigPictureStyle, notificationImage);
621-
setSummaryMethod.invoke(bigPictureStyle, contentText);
622-
setStyleMethod.invoke(notificationBuilder, bigPictureStyle);
623-
} else {
624-
bigTextMethod.invoke(bigTextStyle, contentText);
625-
setStyleMethod.invoke(notificationBuilder, bigTextStyle);
626-
}
627619
} catch (final InterruptedException e) {
628620
log.error("Interrupted when downloading image : " + e.getMessage(), e);
629621
} catch (final ExecutionException e) {
630622
log.error("Failed execute download image thread : " + e.getMessage(), e);
631623
}
632624
}
625+
626+
if (notificationImage != null) {
627+
bigPictureMethod.invoke(bigPictureStyle, notificationImage);
628+
setSummaryMethod.invoke(bigPictureStyle, contentText);
629+
setStyleMethod.invoke(notificationBuilder, bigPictureStyle);
630+
} else {
631+
bigTextMethod.invoke(bigTextStyle, contentText);
632+
setStyleMethod.invoke(notificationBuilder, bigTextStyle);
633+
}
633634

634635
return (Notification) buildMethod.invoke(notificationBuilder);
635636
} catch (final InvocationTargetException ex) {

0 commit comments

Comments
 (0)