diff options
Diffstat (limited to 'app/src/main/java/com')
-rw-r--r-- | app/src/main/java/com/wireguard/android/BaseConfigActivity.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/wireguard/android/BaseConfigActivity.java b/app/src/main/java/com/wireguard/android/BaseConfigActivity.java index 82605f1f..4413f313 100644 --- a/app/src/main/java/com/wireguard/android/BaseConfigActivity.java +++ b/app/src/main/java/com/wireguard/android/BaseConfigActivity.java @@ -21,7 +21,6 @@ abstract class BaseConfigActivity extends Activity { protected static final String TAG_LIST = "list"; protected static final String TAG_PLACEHOLDER = "placeholder"; - private final ServiceConnection callbacks = new ServiceConnectionCallbacks(); private Config currentConfig; private String initialConfig; @@ -41,7 +40,8 @@ abstract class BaseConfigActivity extends Activity { if (VpnService.getInstance() != null) onServiceAvailable(); else - bindService(new Intent(this, VpnService.class), callbacks, Context.BIND_AUTO_CREATE); + bindService(new Intent(this, VpnService.class), new ServiceConnectionCallbacks(), + Context.BIND_AUTO_CREATE); } protected abstract void onCurrentConfigChanged(Config config); @@ -68,7 +68,7 @@ abstract class BaseConfigActivity extends Activity { @Override public void onServiceConnected(final ComponentName component, final IBinder binder) { // We don't actually need a binding, only notification that the service is started. - unbindService(callbacks); + unbindService(this); onServiceAvailable(); } |