summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard/config
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/com/wireguard/config')
-rw-r--r--app/src/main/java/com/wireguard/config/Config.java10
1 files changed, 1 insertions, 9 deletions
diff --git a/app/src/main/java/com/wireguard/config/Config.java b/app/src/main/java/com/wireguard/config/Config.java
index cb9b7ed2..2a282d09 100644
--- a/app/src/main/java/com/wireguard/config/Config.java
+++ b/app/src/main/java/com/wireguard/config/Config.java
@@ -40,7 +40,7 @@ public class Config extends BaseObservable
public static final int NAME_MAX_LENGTH = 16;
private static final Pattern PATTERN = Pattern.compile("^[a-zA-Z0-9_=+.-]{1,16}$");
- private static boolean isNameValid(final String name) {
+ public static boolean isNameValid(final String name) {
return name.length() <= NAME_MAX_LENGTH && PATTERN.matcher(name).matches();
}
@@ -180,14 +180,6 @@ public class Config extends BaseObservable
return sb.toString();
}
- public String validate() {
- if (name == null || !isNameValid(name))
- return "This configuration does not have a valid name.";
- if (iface.getPublicKey() == null)
- return "This configuration does not have a valid keypair.";
- return null;
- }
-
@Override
public void writeToParcel(final Parcel dest, final int flags) {
dest.writeParcelable(iface, flags);