diff options
author | Samuel Holland <samuel@sholland.org> | 2017-08-10 01:11:00 -0500 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2017-08-10 01:11:00 -0500 |
commit | dacd7457d27fb57f4c51b643d5a4e620a386d0b9 (patch) | |
tree | cdba893269dd33e3d6a3a4a851c5a93a76183a14 /app | |
parent | 5fad89527ddad19f2278d44d786c1c0deab7d142 (diff) |
ServiceClientFragment: Connect early if possible
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/com/wireguard/android/ServiceClientFragment.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/ServiceClientFragment.java b/app/src/main/java/com/wireguard/android/ServiceClientFragment.java index 3b209438..7377151c 100644 --- a/app/src/main/java/com/wireguard/android/ServiceClientFragment.java +++ b/app/src/main/java/com/wireguard/android/ServiceClientFragment.java @@ -21,6 +21,9 @@ abstract class ServiceClientFragment<T> extends Fragment implements ServiceConne @SuppressWarnings("unchecked") final ServiceConnectionProvider<T> localContext = (ServiceConnectionProvider<T>) context; provider = localContext; + service = provider.getService(); + if (service != null) + onServiceConnected(service); } @Override |