Application: use proper completablefuture for backend

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2018-07-26 04:54:14 +02:00
parent 7d438e9dbc
commit 62d8beff96
5 changed files with 24 additions and 52 deletions
@@ -94,7 +94,7 @@ public abstract class BaseFragment extends Fragment implements OnSelectedTunnelC
if (tunnel == null)
return;
Application.onHaveBackend(backend -> {
Application.getBackendAsync().thenAccept(backend -> {
if (backend instanceof GoBackend) {
final Intent intent = GoBackend.VpnService.prepare(view.getContext());
if (intent != null) {