|
|
|
@ -583,9 +583,9 @@ public class SimUtil {
|
|
|
|
|
if (pos != -1) {
|
|
|
|
|
ss = ss.substring(0, pos);
|
|
|
|
|
|
|
|
|
|
result.append(",SS=" + ss);
|
|
|
|
|
result.append(",SL=" + ss);
|
|
|
|
|
int ssVal = Integer.parseInt(ss);
|
|
|
|
|
result.append(",SL=" + Integer.toString(MpMasterService.getSignalLevel(ssVal, 5)));
|
|
|
|
|
result.append("/" + Integer.toString(MpMasterService.getSignalLevel(ssVal, 5)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -594,7 +594,7 @@ public class SimUtil {
|
|
|
|
|
// boolean b2 = tm.isDataCapable();
|
|
|
|
|
boolean b3 = tm.isDataRoamingEnabled();
|
|
|
|
|
|
|
|
|
|
result.append(isActiveSlot ? ",默认数据传输" : ",非默认数据传输");
|
|
|
|
|
result.append(isActiveSlot ? ",默认" : ",");
|
|
|
|
|
|
|
|
|
|
result.append(" ");
|
|
|
|
|
}
|
|
|
|
@ -603,7 +603,7 @@ public class SimUtil {
|
|
|
|
|
ex.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
|
return result.toString().trim();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String getSimStateName(int simState) {
|
|
|
|
@ -653,7 +653,7 @@ public class SimUtil {
|
|
|
|
|
case TelephonyManager.NETWORK_TYPE_LTE:
|
|
|
|
|
return "4G";
|
|
|
|
|
default:
|
|
|
|
|
return "UNKNOWN";
|
|
|
|
|
return "未知";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -736,12 +736,10 @@ public class SimUtil {
|
|
|
|
|
SubscriptionInfo simInfoAnother = null;
|
|
|
|
|
if (doubleSim) {
|
|
|
|
|
if (localList != null && localList.size() > 1) {
|
|
|
|
|
SubscriptionInfo simInfo1 = (SubscriptionInfo) localList.get(0);
|
|
|
|
|
SubscriptionInfo simInfo2 = (SubscriptionInfo) localList.get(1);
|
|
|
|
|
if (slot == 0) {
|
|
|
|
|
simInfoAnother = simInfo1;
|
|
|
|
|
simInfoAnother = (SubscriptionInfo) localList.get(0);
|
|
|
|
|
} else {
|
|
|
|
|
simInfoAnother = simInfo2;
|
|
|
|
|
simInfoAnother = (SubscriptionInfo) localList.get(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -756,7 +754,18 @@ public class SimUtil {
|
|
|
|
|
//deliveryIntent参数为传送后接受的广播信息PendingIntent
|
|
|
|
|
// PendingIntent deliverPI = PendingIntent.getBroadcast(mContext,0,itDeliver,0);
|
|
|
|
|
if (simInfoAnother != null) {
|
|
|
|
|
SmsManager.getSmsManagerForSubscriptionId(simInfoAnother.getSubscriptionId()).sendTextMessage(sender, null, message, sendPI, null);
|
|
|
|
|
SmsManager smsManager = SmsManager.getSmsManagerForSubscriptionId(simInfoAnother.getSubscriptionId());
|
|
|
|
|
if (message.length() > 70) {
|
|
|
|
|
ArrayList<String> msgs = smsManager.divideMessage(message);
|
|
|
|
|
ArrayList<PendingIntent> sentIntents = new ArrayList<PendingIntent>();
|
|
|
|
|
|
|
|
|
|
for(int i = 0;i < msgs.size(); i++){
|
|
|
|
|
sentIntents.add(sendPI);
|
|
|
|
|
}
|
|
|
|
|
smsManager.sendMultipartTextMessage(sender, null, msgs, sentIntents, null);
|
|
|
|
|
} else {
|
|
|
|
|
smsManager.sendTextMessage(sender, null, message, sendPI, null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|