summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java/com/wireguard
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-09 12:11:09 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-03-09 12:16:02 -0600
commitc00a0b12e4bf353a20a520c59961b21374050089 (patch)
treeb61645cbb96278eb822d898d174c5ac4996e250f /ui/src/main/java/com/wireguard
parent0e21520fd1f0c1d24b8468ff0081faeaec5aca4d (diff)
Application: simplify static block
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/java/com/wireguard')
-rw-r--r--ui/src/main/java/com/wireguard/android/Application.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/ui/src/main/java/com/wireguard/android/Application.java b/ui/src/main/java/com/wireguard/android/Application.java
index 655c6b21..e32c3755 100644
--- a/ui/src/main/java/com/wireguard/android/Application.java
+++ b/ui/src/main/java/com/wireguard/android/Application.java
@@ -37,14 +37,7 @@ import java9.util.concurrent.CompletableFuture;
public class Application extends android.app.Application implements SharedPreferences.OnSharedPreferenceChangeListener {
private static final String TAG = "WireGuard/" + Application.class.getSimpleName();
- public static final String USER_AGENT;
-
- static {
- String preferredAbi = "unknown ABI";
- if (Build.SUPPORTED_ABIS.length > 0)
- preferredAbi = Build.SUPPORTED_ABIS[0];
- USER_AGENT = String.format(Locale.ENGLISH, "WireGuard/%s (Android %d; %s; %s; %s %s; %s)", BuildConfig.VERSION_NAME, Build.VERSION.SDK_INT, preferredAbi, Build.BOARD, Build.MANUFACTURER, Build.MODEL, Build.FINGERPRINT);
- }
+ public static final String USER_AGENT = String.format(Locale.ENGLISH, "WireGuard/%s (Android %d; %s; %s; %s %s; %s)", BuildConfig.VERSION_NAME, Build.VERSION.SDK_INT, Build.SUPPORTED_ABIS.length > 0 ? Build.SUPPORTED_ABIS[0] : "unknown ABI", Build.BOARD, Build.MANUFACTURER, Build.MODEL, Build.FINGERPRINT);
@SuppressWarnings("NullableProblems") private static WeakReference<Application> weakSelf;
private final CompletableFuture<Backend> futureBackend = new CompletableFuture<>();