@@ -352,10 +352,10 @@ public void sendToNotificationCentreWithPicture(Bundle bundle, Bitmap largeIconB
352
352
353
353
String smallIcon = bundle .getString ("smallIcon" );
354
354
355
- if (smallIcon != null ) {
356
- smallIconResId = res .getIdentifier (smallIcon , "mipmap" , packageName );
357
- } else if (! smallIcon . isEmpty () ) {
358
- smallIconResId = res .getIdentifier ("ic_notification" , "mipmap" , packageName );
355
+ if (smallIcon != null && ! smallIcon . isEmpty () ) {
356
+ smallIconResId = res .getIdentifier (smallIcon , "mipmap" , packageName );
357
+ } else if ( smallIcon == null ) {
358
+ smallIconResId = res .getIdentifier ("ic_notification" , "mipmap" , packageName );
359
359
}
360
360
361
361
if (smallIconResId == 0 ) {
@@ -374,10 +374,10 @@ public void sendToNotificationCentreWithPicture(Bundle bundle, Bitmap largeIconB
374
374
375
375
String largeIcon = bundle .getString ("largeIcon" );
376
376
377
- if (largeIcon != null ) {
378
- largeIconResId = res .getIdentifier (largeIcon , "mipmap" , packageName );
379
- } else if (! largeIcon . isEmpty () ) {
380
- largeIconResId = res .getIdentifier ("ic_launcher" , "mipmap" , packageName );
377
+ if (largeIcon != null && ! largeIcon . isEmpty () ) {
378
+ largeIconResId = res .getIdentifier (largeIcon , "mipmap" , packageName );
379
+ } else if ( largeIcon == null ) {
380
+ largeIconResId = res .getIdentifier ("ic_launcher" , "mipmap" , packageName );
381
381
}
382
382
383
383
// Before Lolipop there was no large icon for notifications.
0 commit comments