mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-03 01:17:41 +08:00
整理:检查代码
This commit is contained in:
parent
f18d64467b
commit
83bbb7b7b4
@ -748,6 +748,7 @@ public class SenderActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
//企业微信群机器人
|
||||
@SuppressWarnings("SpellCheckingInspection")
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
private void setQYWXGroupRobot(final SenderModel senderModel) {
|
||||
QYWXGroupRobotSettingVo qywxGroupRobotSettingVo = null;
|
||||
@ -832,6 +833,7 @@ public class SenderActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
//企业微信应用
|
||||
@SuppressWarnings("SpellCheckingInspection")
|
||||
@SuppressLint({"SimpleDateFormat", "SetTextI18n"})
|
||||
private void setQYWXApp(final SenderModel senderModel) {
|
||||
QYWXAppSettingVo QYWXAppSettingVo = null;
|
||||
|
@ -17,7 +17,7 @@ import java.util.regex.PatternSyntaxException;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings({"unused", "LoopStatementThatDoesntLoop"})
|
||||
@SuppressWarnings({"unused", "SpellCheckingInspection"})
|
||||
@Data
|
||||
public class RuleModel {
|
||||
public static final String FILED_TRANSPOND_ALL = "transpond_all";
|
||||
|
@ -9,6 +9,7 @@ public final class RuleTable {
|
||||
}
|
||||
|
||||
/* Inner class that defines the table contents */
|
||||
@SuppressWarnings("SpellCheckingInspection")
|
||||
public static class RuleEntry implements BaseColumns {
|
||||
public static final String TABLE_NAME = "rule";
|
||||
public static final String COLUMN_NAME_TYPE = "type";
|
||||
|
@ -34,7 +34,7 @@ import okhttp3.Request;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.Response;
|
||||
|
||||
@SuppressWarnings({"ResultOfMethodCallIgnored", "rawtypes", "unchecked", "deprecation"})
|
||||
@SuppressWarnings({"ResultOfMethodCallIgnored", "rawtypes", "unchecked", "deprecation", "SpellCheckingInspection"})
|
||||
public class SenderDingdingMsg extends SenderBaseMsg {
|
||||
|
||||
static final String TAG = "SenderDingdingMsg";
|
||||
|
@ -30,7 +30,7 @@ import okhttp3.Request;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.Response;
|
||||
|
||||
@SuppressWarnings({"ResultOfMethodCallIgnored", "rawtypes", "unchecked", "deprecation"})
|
||||
@SuppressWarnings("ALL")
|
||||
public class SenderFeishuMsg extends SenderBaseMsg {
|
||||
|
||||
static final String TAG = "SenderFeishuMsg";
|
||||
@ -56,7 +56,7 @@ public class SenderFeishuMsg extends SenderBaseMsg {
|
||||
mac.init(new SecretKeySpec(stringToSign.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
|
||||
byte[] signData = mac.doFinal(new byte[]{});
|
||||
String sign = new String(Base64.encode(signData, Base64.NO_WRAP));
|
||||
|
||||
|
||||
textMsgMap.put("timestamp", timestamp);
|
||||
textMsgMap.put("sign", sign);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
@SuppressWarnings({"deprecation", "rawtypes", "unchecked", "CommentedOutCode", "SynchronizeOnNonFinalField", "unused", "SameReturnValue"})
|
||||
@SuppressWarnings({"deprecation", "rawtypes", "unchecked", "CommentedOutCode", "SynchronizeOnNonFinalField", "unused", "SameReturnValue", "SpellCheckingInspection"})
|
||||
public class PhoneUtils {
|
||||
static Boolean hasInit = false;
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
@ -530,6 +530,7 @@ public class PhoneUtils {
|
||||
/**
|
||||
* SIM 卡信息
|
||||
*/
|
||||
@SuppressWarnings("SpellCheckingInspection")
|
||||
public static class SimInfo {
|
||||
/**
|
||||
* 运营商信息:中国移动 中国联通 中国电信
|
||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@SuppressWarnings({"unused", "SpellCheckingInspection"})
|
||||
class RuleLine {
|
||||
public static final String CONJUNCTION_AND = "并且";
|
||||
public static final String CONJUNCTION_OR = "或者";
|
||||
|
@ -10,7 +10,7 @@ import com.idormy.sms.forwarder.model.vo.SmsVo;
|
||||
import java.util.Date;
|
||||
import java.util.Scanner;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@SuppressWarnings("ALL")
|
||||
public class RuleLineUtils {
|
||||
static final String TAG = "RuleLineUtils";
|
||||
static Boolean STARTLOG = false;
|
||||
|
@ -211,7 +211,7 @@ public class SettingUtil {
|
||||
// 获取PackageManager的实例
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
// getPackageName()是你当前类的包名,0代表是获取版本信息
|
||||
PackageInfo packInfo = null;
|
||||
PackageInfo packInfo;
|
||||
try {
|
||||
packInfo = packageManager.getPackageInfo(context.getPackageName(), 0);
|
||||
return packInfo.versionName;
|
||||
|
@ -11,11 +11,11 @@ public class TimeUtil {
|
||||
|
||||
//友好时间显示
|
||||
public static String friendlyTime(String utcTime) {
|
||||
@SuppressLint("SimpleDateFormat") SimpleDateFormat utcFormater = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
utcFormater.setTimeZone(TimeZone.getTimeZone("UTC"));//时区定义并进行时间获取
|
||||
@SuppressLint("SimpleDateFormat") SimpleDateFormat utcFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
utcFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));//时区定义并进行时间获取
|
||||
Date utcDate;
|
||||
try {
|
||||
utcDate = utcFormater.parse(utcTime);
|
||||
utcDate = utcFormatter.parse(utcTime);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
return utcTime;
|
||||
@ -59,21 +59,21 @@ public class TimeUtil {
|
||||
public static String utc2Local(String utcTime) {
|
||||
String utcTimePatten = "yyyy-MM-dd HH:mm:ss";
|
||||
String localTimePatten = "yyyy-MM-dd HH:mm:ss";
|
||||
@SuppressLint("SimpleDateFormat") SimpleDateFormat utcFormater = new SimpleDateFormat(utcTimePatten);
|
||||
utcFormater.setTimeZone(TimeZone.getTimeZone("UTC"));//时区定义并进行时间获取
|
||||
@SuppressLint("SimpleDateFormat") SimpleDateFormat utcFormatter = new SimpleDateFormat(utcTimePatten);
|
||||
utcFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));//时区定义并进行时间获取
|
||||
|
||||
Date utcDate;
|
||||
try {
|
||||
utcDate = utcFormater.parse(utcTime);
|
||||
utcDate = utcFormatter.parse(utcTime);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
return utcTime;
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat") SimpleDateFormat localFormater = new SimpleDateFormat(localTimePatten);
|
||||
localFormater.setTimeZone(TimeZone.getDefault());
|
||||
@SuppressLint("SimpleDateFormat") SimpleDateFormat localFormatter = new SimpleDateFormat(localTimePatten);
|
||||
localFormatter.setTimeZone(TimeZone.getDefault());
|
||||
assert utcDate != null;
|
||||
return localFormater.format(utcDate.getTime());
|
||||
return localFormatter.format(utcDate.getTime());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -223,11 +223,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints=""
|
||||
android:inputType="textMultiLine"
|
||||
android:inputType="text"
|
||||
android:gravity="start|top"
|
||||
android:minLines="1"
|
||||
android:text=""
|
||||
tools:ignore="LabelFor" />
|
||||
tools:ignore="LabelFor,TextFields" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
Loading…
x
Reference in New Issue
Block a user