aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-02-10 16:55:34 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-02-10 16:55:34 +0100
commitbe4c52f6a3e1c87fb8f16c7eafc1beca0d8d36a4 (patch)
tree150c06423956b5fd4638eee8528e980db44d3581
parentUpdate Russian translation (diff)
downloadwireguard-android-be4c52f6a3e1c87fb8f16c7eafc1beca0d8d36a4.tar.xz
wireguard-android-be4c52f6a3e1c87fb8f16c7eafc1beca0d8d36a4.zip
InetAddresses: don't have global android import
This allows a proper fallback on normal JRE.
-rw-r--r--app/src/main/java/com/wireguard/config/InetAddresses.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/src/main/java/com/wireguard/config/InetAddresses.java b/app/src/main/java/com/wireguard/config/InetAddresses.java
index d24c571..5303e27 100644
--- a/app/src/main/java/com/wireguard/config/InetAddresses.java
+++ b/app/src/main/java/com/wireguard/config/InetAddresses.java
@@ -5,7 +5,6 @@
package com.wireguard.config;
-import android.os.Build;
import java.lang.reflect.Method;
import java.net.Inet4Address;
import java.net.Inet6Address;
@@ -25,7 +24,7 @@ public final class InetAddresses {
static {
Method m = null;
try {
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q)
+ if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.Q)
// noinspection JavaReflectionMemberAccess
m = InetAddress.class.getMethod("parseNumericAddress", String.class);
} catch (final Exception ignored) {
@@ -45,7 +44,7 @@ public final class InetAddresses {
if (address.isEmpty())
throw new ParseException(InetAddress.class, address, "Empty address");
try {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
+ if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q)
return android.net.InetAddresses.parseNumericAddress(address);
else if (PARSER_METHOD != null)
return (InetAddress) PARSER_METHOD.invoke(null, address);