diff --git a/uhabits-android/src/main/AndroidManifest.xml b/uhabits-android/src/main/AndroidManifest.xml index 5d4547550..4c2616ecf 100644 --- a/uhabits-android/src/main/AndroidManifest.xml +++ b/uhabits-android/src/main/AndroidManifest.xml @@ -19,6 +19,7 @@ + diff --git a/uhabits-android/src/main/java/org/isoron/uhabits/intents/IntentScheduler.kt b/uhabits-android/src/main/java/org/isoron/uhabits/intents/IntentScheduler.kt index 5a4c79f1d..089af4af2 100644 --- a/uhabits-android/src/main/java/org/isoron/uhabits/intents/IntentScheduler.kt +++ b/uhabits-android/src/main/java/org/isoron/uhabits/intents/IntentScheduler.kt @@ -25,8 +25,6 @@ import android.app.AlarmManager.RTC_WAKEUP import android.app.PendingIntent import android.content.Context import android.content.Context.ALARM_SERVICE -import android.os.Build.VERSION.SDK_INT -import android.os.Build.VERSION_CODES.M import android.util.Log import org.isoron.uhabits.core.AppScope import org.isoron.uhabits.core.models.Habit @@ -58,10 +56,7 @@ class IntentScheduler ) return SchedulerResult.IGNORED } - if (SDK_INT >= M) - manager.setExactAndAllowWhileIdle(alarmType, timestamp, intent) - else - manager.setExact(alarmType, timestamp, intent) + manager.setExactAndAllowWhileIdle(alarmType, timestamp, intent) return SchedulerResult.OK }