|
@@ -37,6 +37,7 @@ import android.content.SharedPreferences;
|
|
|
import android.content.SharedPreferences.Editor;
|
|
import android.content.SharedPreferences.Editor;
|
|
|
import android.os.Build;
|
|
import android.os.Build;
|
|
|
import android.support.v4.app.NotificationCompat.Builder;
|
|
import android.support.v4.app.NotificationCompat.Builder;
|
|
|
|
|
+import android.util.Log;
|
|
|
import android.widget.Toast;
|
|
import android.widget.Toast;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -143,7 +144,7 @@ public class NotificationWrapper {
|
|
|
try {
|
|
try {
|
|
|
arguments = new JSONObject(alarms.get(id).toString());
|
|
arguments = new JSONObject(alarms.get(id).toString());
|
|
|
} catch (JSONException e) {
|
|
} catch (JSONException e) {
|
|
|
- e.printStackTrace();
|
|
|
|
|
|
|
+ Log.e("NotificationWrapper", "Update failed. No Notification available for the given id: " + id );
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
arguments = updateArguments(arguments, updates);
|
|
arguments = updateArguments(arguments, updates);
|
|
@@ -188,6 +189,7 @@ public class NotificationWrapper {
|
|
|
unpersist(notificationId);
|
|
unpersist(notificationId);
|
|
|
}
|
|
}
|
|
|
} catch (JSONException e) {
|
|
} catch (JSONException e) {
|
|
|
|
|
+ unpersist(notificationId);
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -340,6 +342,21 @@ public class NotificationWrapper {
|
|
|
if(!updates.isNull("icon")){
|
|
if(!updates.isNull("icon")){
|
|
|
arguments.put("icon", updates.get("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){
|
|
} catch (JSONException jse){
|
|
|
jse.printStackTrace();
|
|
jse.printStackTrace();
|
|
|
}
|
|
}
|