doze: Mark intent as nullable for onStartCommand() and onBind()

See: https://developer.android.com/reference/kotlin/android/app/Service
Change-Id: I547db2abffc40863a00c42528cd44182e0889e68
This commit is contained in:
LuK1337
2021-09-27 16:03:28 +02:00
parent c7f76a731f
commit 25593fedb6

View File

@@ -37,7 +37,7 @@ class DozeService : Service() {
registerReceiver(screenStateReceiver, screenStateFilter)
}
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
return START_STICKY
}
@@ -49,7 +49,7 @@ class DozeService : Service() {
pocketSensor.disable()
}
override fun onBind(intent: Intent): IBinder? = null
override fun onBind(intent: Intent?): IBinder? = null
private fun onDisplayOn() {
if (Utils.isPickUpEnabled(this)) {