diff --git a/doze/src/org/lineageos/settings/doze/DozeSettingsFragment.kt b/doze/src/org/lineageos/settings/doze/DozeSettingsFragment.kt
index 0d61885..54d8cb0 100644
--- a/doze/src/org/lineageos/settings/doze/DozeSettingsFragment.kt
+++ b/doze/src/org/lineageos/settings/doze/DozeSettingsFragment.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021 The LineageOS Project
+ * Copyright (C) 2021-2024 The LineageOS Project
  * SPDX-License-Identifier: Apache-2.0
  */
 
@@ -49,7 +49,7 @@
         alwaysOnDisplayPreference.onPreferenceChangeListener = this
 
         val pickupSensorCategory =
-            preferenceScreen.findPreference<PreferenceCategory>(Utils.CATEGORY_PICKUP_SENSOR)
+            preferenceScreen.findPreference<PreferenceCategory>(Utils.CATEGORY_PICKUP_SENSOR)!!
         if (getString(R.string.pickup_sensor_type).isEmpty()) {
             preferenceScreen.removePreference(pickupSensorCategory)
         }
@@ -62,7 +62,7 @@
         if (!Utils.alwaysOnDisplayAvailable(context)) {
             preferenceScreen.removePreference(alwaysOnDisplayPreference)
         } else {
-            pickupSensorCategory?.dependency = Utils.ALWAYS_ON_DISPLAY
+            pickupSensorCategory.dependency = Utils.ALWAYS_ON_DISPLAY
         }
     }
 
diff --git a/doze/src/org/lineageos/settings/doze/PickupSensor.kt b/doze/src/org/lineageos/settings/doze/PickupSensor.kt
index 3a46c83..a7fc0d5 100644
--- a/doze/src/org/lineageos/settings/doze/PickupSensor.kt
+++ b/doze/src/org/lineageos/settings/doze/PickupSensor.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021-2022 The LineageOS Project
+ * Copyright (C) 2021-2024 The LineageOS Project
  * SPDX-License-Identifier: Apache-2.0
  */
 
@@ -19,10 +19,10 @@
 class PickupSensor(
     private val context: Context, sensorType: String, private val sensorValue: Float
 ) : SensorEventListener {
-    private val powerManager = context.getSystemService(PowerManager::class.java)
+    private val powerManager = context.getSystemService(PowerManager::class.java)!!
     private val wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG)
 
-    private val sensorManager = context.getSystemService(SensorManager::class.java)
+    private val sensorManager = context.getSystemService(SensorManager::class.java)!!
     private val sensor = Utils.getSensor(sensorManager, sensorType)
 
     private val executorService = Executors.newSingleThreadExecutor()
diff --git a/doze/src/org/lineageos/settings/doze/PocketSensor.kt b/doze/src/org/lineageos/settings/doze/PocketSensor.kt
index 3af29c6..951e7c3 100644
--- a/doze/src/org/lineageos/settings/doze/PocketSensor.kt
+++ b/doze/src/org/lineageos/settings/doze/PocketSensor.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021-2022 The LineageOS Project
+ * Copyright (C) 2021-2024 The LineageOS Project
  * SPDX-License-Identifier: Apache-2.0
  */
 
@@ -18,7 +18,7 @@
 class PocketSensor(
     private val context: Context, sensorType: String, private val sensorValue: Float
 ) : SensorEventListener {
-    private val sensorManager = context.getSystemService(SensorManager::class.java)
+    private val sensorManager = context.getSystemService(SensorManager::class.java)!!
     private val sensor = Utils.getSensor(sensorManager, sensorType)
 
     private val executorService = Executors.newSingleThreadExecutor()
diff --git a/doze/src/org/lineageos/settings/doze/Utils.kt b/doze/src/org/lineageos/settings/doze/Utils.kt
index 58a7d7f..4baf7b1 100644
--- a/doze/src/org/lineageos/settings/doze/Utils.kt
+++ b/doze/src/org/lineageos/settings/doze/Utils.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021 The LineageOS Project
+ * Copyright (C) 2021-2024 The LineageOS Project
  * SPDX-License-Identifier: Apache-2.0
  */
 
@@ -76,22 +76,22 @@
         return AmbientDisplayConfiguration(context).alwaysOnAvailable()
     }
 
-    private fun isGestureEnabled(context: Context?, gesture: String?): Boolean {
+    private fun isGestureEnabled(context: Context, gesture: String?): Boolean {
         return PreferenceManager.getDefaultSharedPreferences(context)
             .getBoolean(gesture, false)
     }
 
-    fun isPickUpEnabled(context: Context?): Boolean {
+    fun isPickUpEnabled(context: Context): Boolean {
         return PreferenceManager.getDefaultSharedPreferences(context)
             .getString(GESTURE_PICK_UP_KEY, "0") != "0"
     }
 
-    fun isPickUpSetToWake(context: Context?): Boolean {
+    fun isPickUpSetToWake(context: Context): Boolean {
         return PreferenceManager.getDefaultSharedPreferences(context)
             .getString(GESTURE_PICK_UP_KEY, "0") == "2"
     }
 
-    private fun areGesturesEnabled(context: Context?): Boolean {
+    private fun areGesturesEnabled(context: Context): Boolean {
         return isPickUpEnabled(context)
     }
 
