修改单卡模式下短信的bug

nx2024
liuguijing 3 months ago committed by Matthew
parent 15833a7cb7
commit 77b84fe187

@ -1160,7 +1160,7 @@ public class SimUtil {
if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {
return;
}
if (localSubscriptionManager.getActiveSubscriptionInfoCount() > 1) {
if (localSubscriptionManager.getActiveSubscriptionInfoCount() > 0) {
List localList = localSubscriptionManager.getActiveSubscriptionInfoList();
boolean doubleSim = isDoubleSim(mContext);
SubscriptionInfo simInfoAnother = null;
@ -1172,6 +1172,10 @@ public class SimUtil {
simInfoAnother = (SubscriptionInfo) localList.get(1);
}
}
} else {
if (localList != null && localList.size() > 0) {
simInfoAnother = (SubscriptionInfo) localList.get(0);
}
}
Intent itSend = new Intent(SMS_SEND_ACTION);
itSend.putExtra(SMSRESTARTTYPE, restartType);

Loading…
Cancel
Save