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 extends Fragment implements ServiceConne @SuppressWarnings("unchecked") final ServiceConnectionProvider localContext = (ServiceConnectionProvider) context; provider = localContext; + service = provider.getService(); + if (service != null) + onServiceConnected(service); } @Override