Skip to content
Snippets Groups Projects
Commit 2f3a8468 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

data transfer: stop if no intent

Change-Id: I55c70c31c48f9d70b01aac317121deb72820220e
parent d8e026d5
No related branches found
No related tags found
No related merge requests found
......@@ -37,12 +37,17 @@ class DataTransferService : Service() {
@Inject
lateinit var mNotificationService: NotificationService
private lateinit var notificationManager: NotificationManagerCompat
private var started = false
private var serviceNotificationId = 0
private val serviceNotifications: MutableSet<Int> = HashSet()
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
if (intent == null) {
stopSelfResult(startId)
return START_NOT_STICKY
}
val notificationId = intent.getIntExtra(NotificationService.KEY_NOTIFICATION_ID, -1)
val action = intent.action
if (ACTION_START == action) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment