From 4d86ec91cfac667486cea7ab9f4ec7c3dada023a Mon Sep 17 00:00:00 2001 From: PeratX <1215714524@qq.com> Date: Wed, 19 Apr 2017 21:33:40 +0800 Subject: [PATCH] Fixed startActivity out of an Activity --- .../java/org/itxtech/daedalus/service/DaedalusVpnService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/itxtech/daedalus/service/DaedalusVpnService.java b/app/src/main/java/org/itxtech/daedalus/service/DaedalusVpnService.java index a01592d..87ef8ed 100644 --- a/app/src/main/java/org/itxtech/daedalus/service/DaedalusVpnService.java +++ b/app/src/main/java/org/itxtech/daedalus/service/DaedalusVpnService.java @@ -54,7 +54,7 @@ public class DaedalusVpnService extends VpnService implements Runnable { private static final int NOTIFICATION_ACTIVATED = 0; - private static final String TAG = "Daedalus"; + private static final String TAG = "DaedalusVpnService"; public static String primaryServer; public static String secondaryServer; @@ -169,7 +169,7 @@ public class DaedalusVpnService extends VpnService implements Runnable { stopSelf(); if (shouldRefresh && MainActivity.getInstance() != null && MainActivity.getInstance().isAppOnForeground()) { - startActivity(new Intent(this, MainActivity.class).putExtra(MainActivity.LAUNCH_ACTION, MainActivity.LAUNCH_ACTION_NONE)); + MainActivity.getInstance().startActivity(new Intent(this, MainActivity.class).putExtra(MainActivity.LAUNCH_ACTION, MainActivity.LAUNCH_ACTION_NONE)); } else if (shouldRefresh) { Daedalus.updateShortcut(this.getApplicationContext()); }