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:
parent
823cb52eff
commit
2544bd3963
@ -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;
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user