summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Buynytskyy <alexbuy@google.com>2023-04-24 18:31:33 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-04-24 18:31:33 +0000
commit4dbcc2f2c1ed4f5f6fc2002e0c4489f458156fc4 (patch)
tree3326cec40cc6add259c695efee5f6d7fdd0e2e19
parent99aa3f02e347c2f907296c73291828cd9f2e647a (diff)
parentb2dafd915284e2b7f83dab470badfe7248b36309 (diff)
downloadDeskClock-4dbcc2f2c1ed4f5f6fc2002e0c4489f458156fc4.tar.gz
Cleaner build fix. am: b2dafd9152
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/DeskClock/+/22787851 Change-Id: Ie16e1ca3504da2fb9a62dcc2726c21990811422c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--src/com/android/deskclock/Utils.kt4
-rw-r--r--src/com/android/deskclock/alarms/AlarmStateManager.kt2
-rw-r--r--src/com/android/deskclock/data/TimerModel.kt6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/deskclock/Utils.kt b/src/com/android/deskclock/Utils.kt
index 05c93cd44..3320e20e7 100644
--- a/src/com/android/deskclock/Utils.kt
+++ b/src/com/android/deskclock/Utils.kt
@@ -315,8 +315,8 @@ object Utils {
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
- fun updateNextAlarm(am: AlarmManager, info: AlarmClockInfo?, op: PendingIntent?) {
- am.setAlarmClock(info!!, op!!)
+ fun updateNextAlarm(am: AlarmManager, info: AlarmClockInfo, op: PendingIntent) {
+ am.setAlarmClock(info, op)
}
fun isAlarmWithin24Hours(alarmInstance: AlarmInstance): Boolean {
diff --git a/src/com/android/deskclock/alarms/AlarmStateManager.kt b/src/com/android/deskclock/alarms/AlarmStateManager.kt
index 2478ef5c1..c98380c97 100644
--- a/src/com/android/deskclock/alarms/AlarmStateManager.kt
+++ b/src/com/android/deskclock/alarms/AlarmStateManager.kt
@@ -288,7 +288,7 @@ class AlarmStateManager : BroadcastReceiver() {
PendingIntent.FLAG_UPDATE_CURRENT)
val info = AlarmClockInfo(alarmTime, viewIntent)
- Utils.updateNextAlarm(alarmManager, info, operation)
+ Utils.updateNextAlarm(alarmManager, info, operation!!)
} else if (operation != null) {
LogUtils.i("Canceling upcoming AlarmClockInfo")
alarmManager.cancel(operation)
diff --git a/src/com/android/deskclock/data/TimerModel.kt b/src/com/android/deskclock/data/TimerModel.kt
index bd61bf3eb..2b97af719 100644
--- a/src/com/android/deskclock/data/TimerModel.kt
+++ b/src/com/android/deskclock/data/TimerModel.kt
@@ -806,12 +806,12 @@ internal class TimerModel(
*/
private val MISSED_THRESHOLD: Long = -MINUTE_IN_MILLIS
- fun schedulePendingIntent(am: AlarmManager, triggerTime: Long, pi: PendingIntent?) {
+ fun schedulePendingIntent(am: AlarmManager, triggerTime: Long, pi: PendingIntent) {
if (Utils.isMOrLater) {
// Ensure the timer fires even if the device is dozing.
- am.setExactAndAllowWhileIdle(ELAPSED_REALTIME_WAKEUP, triggerTime, pi!!)
+ am.setExactAndAllowWhileIdle(ELAPSED_REALTIME_WAKEUP, triggerTime, pi)
} else {
- am.setExact(ELAPSED_REALTIME_WAKEUP, triggerTime, pi!!)
+ am.setExact(ELAPSED_REALTIME_WAKEUP, triggerTime, pi)
}
}
}