From 561eb26edf5e23aaa4da1770d69c04a7614eb3ab Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 19 Oct 2019 01:28:19 +0200 Subject: VpnProfiles are equal if they have the same ip and transport --- app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/src/main/java/se/leap') diff --git a/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java b/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java index d0c0ce0c..ca76a799 100644 --- a/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java +++ b/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java @@ -20,6 +20,7 @@ import android.content.Context; import android.content.res.Resources; import android.os.Looper; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.support.annotation.StringRes; import org.json.JSONException; @@ -186,4 +187,9 @@ public class ConfigHelper { String appName = resources.getString(R.string.app_name); return resources.getString(resourceId, appName); } + + public static boolean stringEqual(@Nullable String string1, @Nullable String string2) { + return (string1 == null && string2 == null) || + (string1 != null && string1.equals(string2)); + } } -- cgit v1.2.3