diff options
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/LogItem.java | 4 | ||||
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/LogItem.java b/main/src/main/java/de/blinkt/openvpn/core/LogItem.java index 65714c43..3ec2e438 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/LogItem.java +++ b/main/src/main/java/de/blinkt/openvpn/core/LogItem.java @@ -15,6 +15,8 @@ import android.os.Parcel; import android.os.Parcelable; import android.text.TextUtils; +import androidx.annotation.StringRes; + import java.io.ByteArrayInputStream; import java.io.UnsupportedEncodingException; import java.lang.reflect.Array; @@ -239,7 +241,7 @@ public class LogItem implements Parcelable { } }; - public LogItem(VpnStatus.LogLevel loglevel, int ressourceId, Object... args) { + public LogItem(VpnStatus.LogLevel loglevel, @StringRes int ressourceId, Object... args) { mRessourceId = ressourceId; mArgs = args; mLevel = loglevel; diff --git a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java index d1814fc2..fb55cba3 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java +++ b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java @@ -11,6 +11,8 @@ import android.os.Build; import android.os.HandlerThread; import android.os.Message; +import androidx.annotation.StringRes; + import java.io.File; import java.io.PrintWriter; import java.io.StringWriter; @@ -408,11 +410,11 @@ public class VpnStatus { newLogItem(new LogItem(LogLevel.DEBUG, message)); } - public static void logInfo(int resourceId, Object... args) { + public static void logInfo(@StringRes int resourceId, Object... args) { newLogItem(new LogItem(LogLevel.INFO, resourceId, args)); } - public static void logDebug(int resourceId, Object... args) { + public static void logDebug(@StringRes int resourceId, Object... args) { newLogItem(new LogItem(LogLevel.DEBUG, resourceId, args)); } @@ -486,7 +488,7 @@ public class VpnStatus { } - public static void logWarning(int resourceId, Object... args) { + public static void logWarning(@StringRes int resourceId, Object... args) { newLogItem(new LogItem(LogLevel.WARNING, resourceId, args)); } @@ -495,11 +497,11 @@ public class VpnStatus { } - public static void logError(int resourceId) { + public static void logError(@StringRes int resourceId) { newLogItem(new LogItem(LogLevel.ERROR, resourceId)); } - public static void logError(int resourceId, Object... args) { + public static void logError(@StringRes int resourceId, Object... args) { newLogItem(new LogItem(LogLevel.ERROR, resourceId, args)); } |