Cleaner build fix. am: b2dafd9152

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/DeskClock/+/22787851

Change-Id: I1ed964b3963de776c0c94b9954ab6f8a6cd21d1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/src/com/android/deskclock/Utils.kt b/src/com/android/deskclock/Utils.kt
index 05c93cd..3320e20 100644
--- a/src/com/android/deskclock/Utils.kt
+++ b/src/com/android/deskclock/Utils.kt
@@ -315,8 +315,8 @@
     }
 
     @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 2478ef5..c98380c 100644
--- a/src/com/android/deskclock/alarms/AlarmStateManager.kt
+++ b/src/com/android/deskclock/alarms/AlarmStateManager.kt
@@ -288,7 +288,7 @@
                         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 bd61bf3..2b97af7 100644
--- a/src/com/android/deskclock/data/TimerModel.kt
+++ b/src/com/android/deskclock/data/TimerModel.kt
@@ -806,12 +806,12 @@
          */
         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)
             }
         }
     }