Remove obsolete checks for API 23

This commit is contained in:
Moez Bhatti
2022-12-12 20:30:04 -05:00
parent ce9ba1b9f9
commit 4f2d4954ed
27 changed files with 88 additions and 282 deletions
@@ -34,11 +34,7 @@ class AlarmManagerImpl @Inject constructor(private val context: Context) : Alarm
override fun setAlarm(date: Long, intent: PendingIntent) {
val alarmManager = context.getSystemService(Context.ALARM_SERVICE) as android.app.AlarmManager
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
alarmManager.setExactAndAllowWhileIdle(android.app.AlarmManager.RTC_WAKEUP, date, intent)
} else {
alarmManager.setExact(android.app.AlarmManager.RTC_WAKEUP, date, intent)
}
alarmManager.setExactAndAllowWhileIdle(android.app.AlarmManager.RTC_WAKEUP, date, intent)
}
}