summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard/android/ProfileService.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/com/wireguard/android/ProfileService.java')
-rw-r--r--app/src/main/java/com/wireguard/android/ProfileService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/ProfileService.java b/app/src/main/java/com/wireguard/android/ProfileService.java
index 96371d6c..1f40a0a1 100644
--- a/app/src/main/java/com/wireguard/android/ProfileService.java
+++ b/app/src/main/java/com/wireguard/android/ProfileService.java
@@ -38,6 +38,9 @@ public class ProfileService extends Service {
@Override
public void onCreate() {
rootShell = new RootShell(this);
+ // Ensure the service sticks around after being unbound. This only needs to happen once.
+ final Intent intent = new Intent(this, ProfileService.class);
+ startService(intent);
new ProfileLoader().execute(getFilesDir().listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {