diff --git a/app/src/main/java/com/idormy/sms/forwarder/model/vo/LogVo.java b/app/src/main/java/com/idormy/sms/forwarder/model/vo/LogVo.java index 9f8ee82a..8212e3b0 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/model/vo/LogVo.java +++ b/app/src/main/java/com/idormy/sms/forwarder/model/vo/LogVo.java @@ -68,15 +68,11 @@ public class LogVo { } public int getSimImageId() { - if (this.simInfo == null) { - return R.mipmap.sim1; + if (this.simInfo != null && !this.simInfo.isEmpty() + && this.simInfo.replace("-", "").substring(0, 4).equals("SIM2")) { + return R.mipmap.sim2; } - String sim = this.simInfo.replace("-", "").substring(0, 4).toLowerCase(); - if (sim == "sim2") { - return R.mipmap.sim2; - } else { - return R.mipmap.sim1; - } + return R.mipmap.sim1; } } diff --git a/app/src/main/java/com/idormy/sms/forwarder/utils/LogUtil.java b/app/src/main/java/com/idormy/sms/forwarder/utils/LogUtil.java index 8424e9a1..514d8c75 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/utils/LogUtil.java +++ b/app/src/main/java/com/idormy/sms/forwarder/utils/LogUtil.java @@ -160,7 +160,6 @@ public class LogUtil { Integer senderType = cursor.getInt( cursor.getColumnIndexOrThrow(SenderTable.SenderEntry.COLUMN_NAME_TYPE)); - Log.d(TAG, "getLog: time" + time); String rule = RuleModel.getRuleMatch(ruleFiled, ruleCheck, ruleValue) + senderName; int senderImageId = SenderModel.getImageId(senderType);