Skip to content

Commit b391937

Browse files
committed
fix: Stop service when last volume lock is removed
Add stopSelf() after stopForeground() in tryHideNotification() to properly terminate the service when no locks remain active.
1 parent c3354fc commit b391937

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/src/main/java/com/klee/volumelockr/service/VolumeService.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ class VolumeService : Service() {
287287
}
288288

289289
stopForeground(Service.STOP_FOREGROUND_REMOVE)
290+
stopSelf()
290291
}
291292

292293
private fun createNotificationContentIntent(): PendingIntent {

0 commit comments

Comments
 (0)