Skip to content

Commit 3f9b06b

Browse files
committed
Make sure we clean up the session notification
1 parent 476a042 commit 3f9b06b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

app/src/main/kotlin/com/darkrockstudios/app/securecamera/auth/SessionService.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class SessionService : Service() {
8181
override fun onTaskRemoved(rootIntent: Intent?) {
8282
Timber.d("App task removed, clearing notification and stopping service")
8383
invalidateSessionUseCase.invalidateSession()
84+
dismissNotification()
8485
stopSelf()
8586
super.onTaskRemoved(rootIntent)
8687
}
@@ -92,6 +93,7 @@ class SessionService : Service() {
9293
if (!authRepository.checkSessionValidity()) {
9394
Timber.d("Session is no longer valid, invalidating session")
9495
invalidateSessionUseCase.invalidateSession()
96+
dismissNotification()
9597
stopSelf()
9698
break
9799
}
@@ -100,6 +102,7 @@ class SessionService : Service() {
100102
} catch (e: Exception) {
101103
Timber.e(e, "Error in SessionService")
102104
} finally {
105+
dismissNotification()
103106
stopSelf()
104107
}
105108
}

0 commit comments

Comments
 (0)