diff options
author | Samuel Holland <samuel@sholland.org> | 2017-08-17 05:39:58 -0500 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2017-08-17 05:39:58 -0500 |
commit | d5d3566e6c210fb8ac715cc7c010e629d736a9a3 (patch) | |
tree | ccd4e9f75ba19befabc29cd534b3729821d81e28 /app/src/main | |
parent | 27241d074eb43ddb00ccd73d243a3526b10461da (diff) |
BaseConfigActivity: Make use of inner class's this
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main')
-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(); } |