From d5d3566e6c210fb8ac715cc7c010e629d736a9a3 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 Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/BaseConfigActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/src/main/java/com/wireguard') 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