Forráskód Böngészése

Fixes #608 bad try/catch usage in getIconBitmap

Sebastián Katzer 10 éve
szülő
commit
c00e96afdc
1 módosított fájl, 3 hozzáadás és 3 törlés
  1. 3 3
      src/android/notification/Options.java

+ 3 - 3
src/android/notification/Options.java

@@ -268,14 +268,14 @@ public class Options {
      * Icon bitmap for the local notification.
      */
     public Bitmap getIconBitmap() {
-        String icon = options.optString("icon", "icon");
         Bitmap bmp;
 
-        try{
+        try {
             Uri uri = Uri.parse(options.optString("iconUri"));
             bmp = assets.getIconFromUri(uri);
         } catch (Exception e){
-            bmp = assets.getIconFromDrawable(icon);
+            e.printStackTrace();
+            bmp = assets.getIconFromDrawable("icon");
         }
 
         return bmp;