Skip to content

Commit da64e09

Browse files
committed
fix: close activities gracefully without force-stopping the app
1 parent 9ffee54 commit da64e09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/to/bitkit/androidServices/LightningNodeService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ class LightningNodeService : Service() {
136136
when (intent?.action) {
137137
ACTION_STOP_SERVICE_AND_APP -> {
138138
Logger.debug("ACTION_STOP_SERVICE_AND_APP detected", context = TAG)
139-
// Close all activities
140-
App.currentActivity?.value?.finishAndRemoveTask()
139+
// Close activities gracefully without force-stopping the app
140+
App.currentActivity?.value?.finishAffinity()
141141
// Stop the service
142142
stopSelf()
143143
return START_NOT_STICKY

0 commit comments

Comments
 (0)