Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 932e3caa authored by cketti's avatar cketti
Browse files

Stop NotificationActionService after work is done

parent 71d6a4f5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -26,14 +26,15 @@ class NotificationActionService : Service() {
    override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
        Timber.i("NotificationActionService started with startId = %d", startId)

        startHandleCommand(intent)
        startHandleCommand(intent, startId)

        return START_NOT_STICKY
    }

    private fun startHandleCommand(intent: Intent) {
    private fun startHandleCommand(intent: Intent, startId: Int) {
        coroutineScope.launch(Dispatchers.IO) {
            handleCommand(intent)
            stopSelf(startId)
        }
    }