From 1daa08ff23125c0e82a8414dac2f06ee26ea610e Mon Sep 17 00:00:00 2001 From: Javier Date: Tue, 18 Feb 2020 21:35:38 +0100 Subject: don't kill the service when the server is stopped --- app/src/main/java/com/javispedro/vndroid/ServerService.java | 1 - app/src/main/java/com/javispedro/vndroid/SettingsActivity.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/javispedro/vndroid/ServerService.java b/app/src/main/java/com/javispedro/vndroid/ServerService.java index f8c8f9b..3ef4dbb 100644 --- a/app/src/main/java/com/javispedro/vndroid/ServerService.java +++ b/app/src/main/java/com/javispedro/vndroid/ServerService.java @@ -136,7 +136,6 @@ public class ServerService extends Service { cleanupServer(); stopForeground(true); - stopSelf(); notifyServerStatusChanged(); } diff --git a/app/src/main/java/com/javispedro/vndroid/SettingsActivity.java b/app/src/main/java/com/javispedro/vndroid/SettingsActivity.java index a5daab7..9c5a767 100644 --- a/app/src/main/java/com/javispedro/vndroid/SettingsActivity.java +++ b/app/src/main/java/com/javispedro/vndroid/SettingsActivity.java @@ -190,6 +190,7 @@ public class SettingsActivity extends AppCompatActivity { public void close(Activity activity) { if (server != null) { server.setServerStatusCallback(null); + server = null; } activity.unbindService(this); callback = null; -- cgit v1.2.3