Skip to content

Commit 3f30378

Browse files
committed
tunnel: newIncompleteFuture requires API 31
Fixes: 3b6ab66 ("ui: raise min SDK to 24") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
1 parent a494c62 commit 3f30378

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,10 @@ public void onDestroy() {
404404
tunnel.onStateChange(State.DOWN);
405405
}
406406
}
407-
vpnService = vpnService.newIncompleteFuture();
407+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
408+
vpnService = vpnService.newIncompleteFuture();
409+
else
410+
vpnService = new CompletableFuture<>();
408411
super.onDestroy();
409412
}
410413

0 commit comments

Comments
 (0)