[fix] Adds missing canScheduleExactAlarm guard.
This commit is contained in:
parent
1917800db5
commit
f07974daee
2 changed files with 3 additions and 3 deletions
|
|
@ -10,8 +10,8 @@ android {
|
|||
applicationId "org.secuso.aktivpause"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 34
|
||||
versionCode 101
|
||||
versionName "1.2.5"
|
||||
versionCode 102
|
||||
versionName "1.2.6"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
buildTypes {
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ public class TimerSchedulerReceiver extends WakefulBroadcastReceiver {
|
|||
}
|
||||
}
|
||||
|
||||
if((done || !scheduleExerciseDaysEnabled)) {
|
||||
if((done || !scheduleExerciseDaysEnabled) && (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) || alarmManager.canScheduleExactAlarms()) {
|
||||
AlarmManagerCompat.setExactAndAllowWhileIdle(alarmManager, AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), automaticTimerPending);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue