Open
Conversation
cancel ------ Issue: the alarm ID was unpersisted before, and therefore was not contingent on the success of, the cancellation operation Fix: the unpersist call is placed after the cancellation operation, and is contingent on its success cancelAll --------- Issue: the cancelAllNotifications was never reached as in line 58 of LocalNotification.java, where was call to args.getString(0) occurs in the error catching code. As the cancelAll function does not take a notification ID parameter, fails and is not handled (as it's within a catch statement). Fix: move the check if an id is present into the sections for add and cancel. Sub-issue: the error message associated with this id check said "Cannot use string for notification id.", however a string is always the output of the getString call its testing. Sub-issue fix: error message changed Issue: unpersistAlarmAll called before the references to the local storage to get the ids to delete Fix: now relying on the unpersist call per ID, allowing for partial success Issue: the AlarmHelper.cancelAll method returns true regardless of whether the cancellations are successful Fix: the AlarmHelper.cancelAll method is no longer used, instead, the LocalNotification.cancelAllNotifications method sequentially calls the LocalNotification.cancelNotification method. AlarmRestoreOnBoot ------------------ Issue: the notification storage in sharedPreferences is a seconds differential to system time at the point of original creation. Hence on recreation, all alarms are moved into the future. Fix: in the LocalNotification addNotification code, the system time is added to the seconds differential before storage Issue: the AlarmOptions.parseOptions is accessing the wrong index of optionsArr (zero rather than 1) Fix: AlarmOptions no longer used Issue: the AlarmOptions.parseOptions relies on a date field that's not constructed anywhere Fix: AlarmOptions no longer used. The stored parameters are processed within AlarmRestoreOnBoot, and the full time is persisted, not the differential (see above) AlarmReceiver ------------- Issue: AlarmReceiver does not unpersist the alarm ID of the handled alarm Fix: AlarmReceiver now unpersists the alarm ID of the handled alarm
Added success and failure callbacks to cancelAll, added cancelwithcallback which is as cancel, except with success and failure callbacks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For full details, please see commit notes.