diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-26 03:17:22 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-26 04:54:14 +0200 |
commit | 62d8beff9693080225fe550d82f105ba3cde5df2 (patch) | |
tree | 3c2200d148fa0bcd00071202e3feace131390a0a /app/src/main/java/com/wireguard/android/preference | |
parent | 7d438e9dbc5b5fbaeb57e6ae4ba99388cebdf0f2 (diff) |
Application: use proper completablefuture for backend
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java/com/wireguard/android/preference')
-rw-r--r-- | app/src/main/java/com/wireguard/android/preference/VersionPreference.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/com/wireguard/android/preference/VersionPreference.java b/app/src/main/java/com/wireguard/android/preference/VersionPreference.java index 525396bc..25ace6e5 100644 --- a/app/src/main/java/com/wireguard/android/preference/VersionPreference.java +++ b/app/src/main/java/com/wireguard/android/preference/VersionPreference.java @@ -23,7 +23,7 @@ public class VersionPreference extends Preference { public VersionPreference(final Context context, final AttributeSet attrs) { super(context, attrs); - Application.onHaveBackend(backend -> { + Application.getBackendAsync().thenAccept(backend -> { versionSummary = getContext().getString(R.string.version_summary_checking, backend.getTypeName().toLowerCase()); Application.getAsyncWorker().supplyAsync(backend::getVersion).whenComplete((version, exception) -> { versionSummary = exception == null |