Skip to content

Commit

Permalink
Make all Pinpoint notificiations expandable
Browse files Browse the repository at this point in the history
  • Loading branch information
Mueller authored and minbi committed Sep 25, 2018
1 parent ecb67fa commit fb18abf
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -616,20 +616,21 @@ private Notification createNotification(final int iconResId, final String title,
if (imageUrl != null) {
try {
notificationImage = new DownloadImageTask().execute(imageUrl).get();
if (notificationImage != null) {
bigPictureMethod.invoke(bigPictureStyle, notificationImage);
setSummaryMethod.invoke(bigPictureStyle, contentText);
setStyleMethod.invoke(notificationBuilder, bigPictureStyle);
} else {
bigTextMethod.invoke(bigTextStyle, contentText);
setStyleMethod.invoke(notificationBuilder, bigTextStyle);
}
} catch (final InterruptedException e) {
log.error("Interrupted when downloading image : " + e.getMessage(), e);
} catch (final ExecutionException e) {
log.error("Failed execute download image thread : " + e.getMessage(), e);
}
}

if (notificationImage != null) {
bigPictureMethod.invoke(bigPictureStyle, notificationImage);
setSummaryMethod.invoke(bigPictureStyle, contentText);
setStyleMethod.invoke(notificationBuilder, bigPictureStyle);
} else {
bigTextMethod.invoke(bigTextStyle, contentText);
setStyleMethod.invoke(notificationBuilder, bigTextStyle);
}

return (Notification) buildMethod.invoke(notificationBuilder);
} catch (final InvocationTargetException ex) {
Expand Down

0 comments on commit fb18abf

Please sign in to comment.