Fix DownloadService nullability
This commit is contained in:
1 parent
fd79d5d034
commit
f06da4c033
1 file changed
+2
-2
@@ -87,7 +87,7 @@ class DownloadService : Service(), DownloadManager.DownloadListener {
|
||||
m509dBuilder = null
|
||||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
handleIntent(intent)
|
||||
return START_STICKY
|
||||
}
|
||||
@@ -408,7 +408,7 @@ class DownloadService : Service(), DownloadManager.DownloadListener {
|
||||
|
||||
private fun checkStopSelf() {
|
||||
if (mDownloadManager == null || mDownloadManager!!.isIdle) {
|
||||
stopForeground(true)
|
||||
stopForeground(STOP_FOREGROUND_REMOVE)
|
||||
stopSelf()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user