mirror of
https://github.com/pppscn/SmsForwarder
synced 2024-11-04 06:00:11 +00:00
整理:删除多余的判断
This commit is contained in:
parent
874cb7f957
commit
86f3960300
@ -30,11 +30,7 @@ public class SmsHubVo implements Serializable {
|
||||
this.msgId = UUID.randomUUID().toString();
|
||||
if (channel != null) {
|
||||
String simInfo = simId == 2 ? SettingUtil.getAddExtraSim2() : SettingUtil.getAddExtraSim1(); //自定义备注优先
|
||||
if (!simInfo.isEmpty()) {
|
||||
simInfo = "SIM" + simId + ":" + simInfo;
|
||||
} else {
|
||||
simInfo = SimUtil.getSimInfo(simId);
|
||||
}
|
||||
simInfo = "SIM" + simId + ":" + simInfo;
|
||||
this.channel = simInfo;
|
||||
}
|
||||
this.content = content;
|
||||
|
@ -81,11 +81,7 @@ public class PhoneStateReceiver extends BroadcastReceiver {
|
||||
Log.d(TAG, "getSubscriptionId = " + callInfo.getSubscriptionId());
|
||||
int simId = SimUtil.getSimIdBySubscriptionId(callInfo.getSubscriptionId());
|
||||
String simInfo = simId == 2 ? SettingUtil.getAddExtraSim2() : SettingUtil.getAddExtraSim1(); //自定义备注优先
|
||||
if (!simInfo.isEmpty()) {
|
||||
simInfo = "SIM" + simId + "_" + simInfo;
|
||||
} else {
|
||||
simInfo = SimUtil.getSimInfo(simId);
|
||||
}
|
||||
simInfo = "SIM" + simId + "_" + simInfo;
|
||||
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
List<PhoneBookEntity> contacts = ContactHelper.getInstance().getContactByNumber(context, phoneNumber);
|
||||
|
@ -53,11 +53,7 @@ public class SmsBroadcastReceiver extends BroadcastReceiver {
|
||||
|
||||
//自定义备注优先
|
||||
simInfo = simId == 2 ? SettingUtil.getAddExtraSim2() : SettingUtil.getAddExtraSim1();
|
||||
if (!simInfo.isEmpty()) {
|
||||
simInfo = "SIM" + simId + "_" + simInfo;
|
||||
} else {
|
||||
simInfo = SimUtil.getSimInfo(simId);
|
||||
}
|
||||
simInfo = "SIM" + simId + "_" + simInfo;
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "获取接收手机号失败:" + e.getMessage());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user