Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another fix for Service_SnoozeAlarm being killed midway #18

Merged
merged 1 commit into from
Nov 14, 2020
Merged

Conversation

WrichikBasu
Copy link
Owner

Some devices are still reporting that the snooze service is being killed midway, even after e384368. The behaviour is this: the service is killed, and an alarm is set on the next day (at same time) immediately.

To be honest, this is becoming frustrating.

Anyway, we have to find the places where the service is being killed, and then another alarm is being set. The only relevant place comes out to be Service_UpdateAlarm.

Service_UpdateAlarm is supposed to be started from AlarmBroadcastReceiver when the following broadcasts are made from the system:

  • Intent.ACTION_BOOT_COMPLETED
  • Intent.ACTION_TIMEZONE_CHANGED
  • Intent.ACTION_TIME_CHANGED

A Google search revealed something very interesting: a person reported that Intent.ACTION_TIME_CHANGED was being triggered many times without changing time manually. The accepted answer states that this action is broadcasted many times if the device uses network provided time.

As an urgent fix, both Intent.ACTION_TIME_CHANGED and Intent.ACTION_TIMEZONE_CHANGED have been removed from the manifest entry of AlarmBroadcastReceiver. Hope this solves the issue temporarily.

Some devices are still reporting that the snooze service is being killed midway, even after e384368. In this commit, some changes have been made in AlarmBroadcastReceiver so as to prevent spurious triggering of Service_UpdateAlarm.
@WrichikBasu WrichikBasu merged commit 31431fc into master Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant