Просмотр исходного кода

oreo bug fix, no smallIcon set in notification (#1792)

* Update AssetUtil.java

Removing Resources.getSystem() to get resource ID because in android 8.1 (physical device) it fire an exception with the DEFALUT_ICON (res://icon) if no smallIcon is set in the notification schedule.
Changed also Options.java for small icon fallback

* Update Options.java

Removed resId = context.getApplicationInfo().icon
The application icon is set always and it is not able to select the resId = android.R.drawable.ic_popup_reminder. This is always set (API 1) and not showing ugly as app icon (notification small icon should be a silhouette)
luca-itro 6 лет назад
Родитель
Сommit
b8f358ebb9

+ 0 - 4
src/android/notification/Options.java

@@ -384,10 +384,6 @@ public final class Options {
             resId = assets.getResId(DEFAULT_ICON);
         }
 
-        if (resId == 0) {
-            resId = context.getApplicationInfo().icon;
-        }
-
         if (resId == 0) {
             resId = android.R.drawable.ic_popup_reminder;
         }

+ 0 - 4
src/android/notification/util/AssetUtil.java

@@ -248,10 +248,6 @@ public final class AssetUtil {
     public int getResId(String resPath) {
         int resId = getResId(context.getResources(), resPath);
 
-        if (resId == 0) {
-            resId = getResId(Resources.getSystem(), resPath);
-        }
-
         return resId;
     }