@@ -319,9 +319,12 @@ public void sendToNotificationCentreWithPicture(Bundle bundle, Bitmap largeIconB
319319 String smallIcon = bundle .getString ("smallIcon" );
320320
321321 if (smallIcon != null && !smallIcon .isEmpty ()) {
322- smallIconResId = res .getIdentifier (smallIcon , "mipmap" , packageName );
322+ smallIconResId = res .getIdentifier (smallIcon , "drawable" , packageName );
323+ if (smallIconResId == 0 ) {
324+ smallIconResId = res .getIdentifier (smallIcon , "mipmap" , packageName );
325+ }
323326 } else if (smallIcon == null ) {
324- smallIconResId = res .getIdentifier ("ic_notification" , "mipmap" , packageName );
327+ smallIconResId = res .getIdentifier ("ic_notification" , "mipmap" , packageName );
325328 }
326329
327330 if (smallIconResId == 0 ) {
@@ -341,9 +344,9 @@ public void sendToNotificationCentreWithPicture(Bundle bundle, Bitmap largeIconB
341344 String largeIcon = bundle .getString ("largeIcon" );
342345
343346 if (largeIcon != null && !largeIcon .isEmpty ()) {
344- largeIconResId = res .getIdentifier (largeIcon , "mipmap" , packageName );
347+ largeIconResId = res .getIdentifier (largeIcon , "mipmap" , packageName );
345348 } else if (largeIcon == null ) {
346- largeIconResId = res .getIdentifier ("ic_launcher" , "mipmap" , packageName );
349+ largeIconResId = res .getIdentifier ("ic_launcher" , "mipmap" , packageName );
347350 }
348351
349352 // Before Lolipop there was no large icon for notifications.
0 commit comments