Loading src/android/notification/Asset.java +1 −1 Changes for src/android/notification/Asset.java: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ public class Asset { } else if (path.startsWith("http")){ return getUriForHTTP(path); } return Uri.parse(path); return Uri.EMPTY; } Loading src/android/notification/Manager.java +2 −2 Changes for src/android/notification/Manager.java: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -281,9 +281,9 @@ public class Manager { /** * Retrieves a list with all currently pending notification JSONObject. * Retrieves a list with all currently pending notification JSONObjects that matches with the given String-Array * * @return JSONArray with all notification-JSONObjects * @return JSONArray with notification-JSONObjects */ public JSONArray getAll(JSONArray ids){ SharedPreferences settings = getSharedPreferences(); Loading src/android/notification/NotificationWrapper.java +18 −1 Changes for src/android/notification/NotificationWrapper.java: 18 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.os.Build; import android.support.v4.app.NotificationCompat.Builder; import android.util.Log; import android.widget.Toast; /** Loading Loading @@ -143,7 +144,7 @@ public class NotificationWrapper { try { arguments = new JSONObject(alarms.get(id).toString()); } catch (JSONException e) { e.printStackTrace(); Log.e("NotificationWrapper", "Update failed. No Notification available for the given id: " + id ); return; } arguments = updateArguments(arguments, updates); Loading Loading @@ -188,6 +189,7 @@ public class NotificationWrapper { unpersist(notificationId); } } catch (JSONException e) { unpersist(notificationId); e.printStackTrace(); return; } Loading Loading @@ -340,6 +342,21 @@ public class NotificationWrapper { if(!updates.isNull("icon")){ arguments.put("icon", updates.get("icon")); } if(!updates.isNull("date")){ arguments.put("date", updates.get("date")); } if(!updates.isNull("repeat")){ arguments.put("repeat", updates.get("repeat")); } if(!updates.isNull("json")){ arguments.put("json", updates.get("json")); } if(!updates.isNull("autoCancel")){ arguments.put("autoCancel", updates.get("autoCancel")); } if(!updates.isNull("ongoing")){ arguments.put("ongoing", updates.get("ongoing")); } } catch (JSONException jse){ jse.printStackTrace(); } Loading src/android/notification/Options.java +2 −16 Changes for src/android/notification/Options.java: 2 added lines, 16 removed lines. Original line number Diff line number Diff line Loading @@ -164,18 +164,10 @@ public class Options { Uri iconUri = null; try{ iconUri = Uri.parse(options.optString("iconUri")); } catch (Exception e){ e.printStackTrace(); } if (iconUri != null) { bmp = getIconFromUri(iconUri); } if (bmp == null) { } catch (Exception e){ bmp = getIconFromRes(icon); } return bmp; } Loading Loading @@ -317,23 +309,17 @@ public class Options { * @return * The corresponding bitmap */ private Bitmap getIconFromUri (Uri uri) { private Bitmap getIconFromUri (Uri uri) throws IOException { Bitmap bmp = null; try { InputStream input = context.getContentResolver().openInputStream(uri); bmp = BitmapFactory.decodeStream(input); } catch (IOException e) { e.printStackTrace(); } return bmp; } /** * Function to set the value of "initialDate" in the JSONArray * @param args The given JSONArray * @return A new JSONArray with the parameter "initialDate" set. */ public void setInitDate(){ long initialDate = options.optLong("date", 0) * 1000; Loading Loading
src/android/notification/Asset.java +1 −1 Changes for src/android/notification/Asset.java: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ public class Asset { } else if (path.startsWith("http")){ return getUriForHTTP(path); } return Uri.parse(path); return Uri.EMPTY; } Loading
src/android/notification/Manager.java +2 −2 Changes for src/android/notification/Manager.java: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -281,9 +281,9 @@ public class Manager { /** * Retrieves a list with all currently pending notification JSONObject. * Retrieves a list with all currently pending notification JSONObjects that matches with the given String-Array * * @return JSONArray with all notification-JSONObjects * @return JSONArray with notification-JSONObjects */ public JSONArray getAll(JSONArray ids){ SharedPreferences settings = getSharedPreferences(); Loading
src/android/notification/NotificationWrapper.java +18 −1 Changes for src/android/notification/NotificationWrapper.java: 18 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.os.Build; import android.support.v4.app.NotificationCompat.Builder; import android.util.Log; import android.widget.Toast; /** Loading Loading @@ -143,7 +144,7 @@ public class NotificationWrapper { try { arguments = new JSONObject(alarms.get(id).toString()); } catch (JSONException e) { e.printStackTrace(); Log.e("NotificationWrapper", "Update failed. No Notification available for the given id: " + id ); return; } arguments = updateArguments(arguments, updates); Loading Loading @@ -188,6 +189,7 @@ public class NotificationWrapper { unpersist(notificationId); } } catch (JSONException e) { unpersist(notificationId); e.printStackTrace(); return; } Loading Loading @@ -340,6 +342,21 @@ public class NotificationWrapper { if(!updates.isNull("icon")){ arguments.put("icon", updates.get("icon")); } if(!updates.isNull("date")){ arguments.put("date", updates.get("date")); } if(!updates.isNull("repeat")){ arguments.put("repeat", updates.get("repeat")); } if(!updates.isNull("json")){ arguments.put("json", updates.get("json")); } if(!updates.isNull("autoCancel")){ arguments.put("autoCancel", updates.get("autoCancel")); } if(!updates.isNull("ongoing")){ arguments.put("ongoing", updates.get("ongoing")); } } catch (JSONException jse){ jse.printStackTrace(); } Loading
src/android/notification/Options.java +2 −16 Changes for src/android/notification/Options.java: 2 added lines, 16 removed lines. Original line number Diff line number Diff line Loading @@ -164,18 +164,10 @@ public class Options { Uri iconUri = null; try{ iconUri = Uri.parse(options.optString("iconUri")); } catch (Exception e){ e.printStackTrace(); } if (iconUri != null) { bmp = getIconFromUri(iconUri); } if (bmp == null) { } catch (Exception e){ bmp = getIconFromRes(icon); } return bmp; } Loading Loading @@ -317,23 +309,17 @@ public class Options { * @return * The corresponding bitmap */ private Bitmap getIconFromUri (Uri uri) { private Bitmap getIconFromUri (Uri uri) throws IOException { Bitmap bmp = null; try { InputStream input = context.getContentResolver().openInputStream(uri); bmp = BitmapFactory.decodeStream(input); } catch (IOException e) { e.printStackTrace(); } return bmp; } /** * Function to set the value of "initialDate" in the JSONArray * @param args The given JSONArray * @return A new JSONArray with the parameter "initialDate" set. */ public void setInitDate(){ long initialDate = options.optLong("date", 0) * 1000; Loading