Skip to content

Commit

Permalink
Use AlarmClock for more exact high priority alarms
Browse files Browse the repository at this point in the history
  • Loading branch information
timkellypa committed Apr 16, 2020
1 parent 3b63bf0 commit 7721ecb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/android/notification/Notification.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ void schedule(Request request, Class<?> receiver) {
break;
case PRIORITY_MAX:
if (SDK_INT >= M) {
mgr.setExactAndAllowWhileIdle(RTC_WAKEUP, time, pi);
AlarmManager.AlarmClockInfo info = new AlarmManager.AlarmClockInfo(time, pi);
mgr.setAlarmClock(info, pi);
} else {
mgr.setExact(RTC_WAKEUP, time, pi);
}
Expand Down

0 comments on commit 7721ecb

Please sign in to comment.