mirror of
https://github.com/pppscn/SmsForwarder
synced 2024-11-15 18:13:57 +00:00
Merge pull request #25 from aoe-iu/main
解决“设置页面关闭卡槽信息,同时使用默认模板时,发送消息卡槽信息仍显示”
This commit is contained in:
commit
ac5f2d4992
@ -59,13 +59,14 @@ public class SmsVo implements Serializable {
|
||||
boolean switchSmsTemplate = SettingUtil.getSwitchSmsTemplate();
|
||||
String smsTemplate = SettingUtil.getSmsTemplate().trim();
|
||||
String deviceMark = SettingUtil.getAddExtraDeviceMark().trim();
|
||||
if (!switchAddExtra) {
|
||||
smsTemplate = smsTemplate.replace("{{卡槽信息}}\n", "").replace("{{卡槽信息}}", "");
|
||||
}
|
||||
if (!switchSmsTemplate) {
|
||||
smsTemplate = "{{来源号码}}\n{{短信内容}}\n{{卡槽信息}}\n{{接收时间}}\n{{设备名称}}";
|
||||
}
|
||||
|
||||
if (!switchAddExtra) {
|
||||
smsTemplate = smsTemplate.replace("{{卡槽信息}}\n", "").replace("{{卡槽信息}}", "");
|
||||
}
|
||||
|
||||
return smsTemplate.replace("{{来源号码}}", mobile)
|
||||
.replace("{{短信内容}}", content)
|
||||
.replace("{{卡槽信息}}", simInfo)
|
||||
|
@ -49,7 +49,7 @@ public class SimUtil {
|
||||
Log.d(TAG, "getSimExtra Fail: " + e.getMessage());
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user