Skip to content

Commit 8f277be

Browse files
committed
Vpn service inheritance possibility
1 parent 8963f2f commit 8f277be

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ public State setState(final Tunnel tunnel, State state, @Nullable final Config c
240240
return getState(tunnel);
241241
}
242242

243-
protected Class<? extends VpnService> getVpnServiceClass() {
244-
return VpnService.class;
243+
protected void performStartService(Context context) {
244+
context.startService(new Intent(context, VpnService.class));
245245
}
246246

247247
private void setStateInternal(final Tunnel tunnel, @Nullable final Config config, final State state)
@@ -258,7 +258,7 @@ private void setStateInternal(final Tunnel tunnel, @Nullable final Config config
258258
final VpnService service;
259259
if (!vpnService.isDone()) {
260260
Log.d(TAG, "Requesting to start VpnService");
261-
context.startService(new Intent(context, getVpnServiceClass()));
261+
performStartService(context);
262262
}
263263

264264
try {

0 commit comments

Comments
 (0)