소스 검색

Fixes #608 bad try/catch usage in getIconBitmap

Sebastián Katzer 10 년 전
부모
커밋
c00e96afdc
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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;