From a057d0bc63ceb8f8154dfc39731c0f8eee412a27 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Thu, 17 Aug 2017 05:39:58 -0500 Subject: BaseConfigActivity: Make use of inner class's this --- app/src/main/java/com/wireguard/android/BaseConfigActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/src/main/java/com') 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(); } -- cgit v1.2.3