summaryrefslogtreecommitdiffhomepage
path: root/app/src
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2017-08-10 01:11:00 -0500
committerSamuel Holland <samuel@sholland.org>2017-08-10 01:11:00 -0500
commitf33bebeb8e149b0f21e6650b4052de529a37199d (patch)
treecdba893269dd33e3d6a3a4a851c5a93a76183a14 /app/src
parent41beac9e0e952190bb278f91b1f542b15d46e826 (diff)
ServiceClientFragment: Connect early if possible
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/wireguard/android/ServiceClientFragment.java3
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