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
@@ -328,11 +328,7 @@ class MessageRepositoryImpl @Inject constructor(
val intent = getIntentForDelayedSms(message.id)
val alarmManager = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, sendTime, intent)
} else {
alarmManager.setExact(AlarmManager.RTC_WAKEUP, sendTime, intent)
}
alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, sendTime, intent)
} else { // No delay
val message = insertSentSms(subId, threadId, addresses.first(), strippedBody, now())
sendSms(message)