0
0
mirror of https://github.com/schwabe/ics-openvpn.git synced 2024-09-19 19:42:29 +02:00

Add @StringRes annotations to VPNStatus log methods

This commit is contained in:
Arne Schwabe 2023-11-24 15:51:27 +01:00
parent 823cb52eff
commit 2544bd3963
2 changed files with 10 additions and 6 deletions

View File

@ -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;

View File

@ -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));
}