/ Only execute setAlarmViaAlarmManager when we are running Lollipop+.
This commit is contained in:
parent
6e7abecb17
commit
7651c080c2
|
@ -84,7 +84,9 @@ public class SleepAlarmWidget extends AppWidgetProvider {
|
||||||
GBAlarm alarm = new GBAlarm(0, true, true, Alarm.ALARM_ONCE, hours, minutes);
|
GBAlarm alarm = new GBAlarm(0, true, true, Alarm.ALARM_ONCE, hours, minutes);
|
||||||
alarm.store();
|
alarm.store();
|
||||||
|
|
||||||
|
if (GBApplication.isRunningLollipopOrLater()) {
|
||||||
setAlarmViaAlarmManager(context, calendar.getTimeInMillis());
|
setAlarmViaAlarmManager(context, calendar.getTimeInMillis());
|
||||||
|
}
|
||||||
|
|
||||||
GB.toast(context,
|
GB.toast(context,
|
||||||
String.format(context.getString(R.string.appwidget_alarms_set), hours, minutes),
|
String.format(context.getString(R.string.appwidget_alarms_set), hours, minutes),
|
||||||
|
|
Loading…
Reference in New Issue