找到:
frameworks\opt\telephony\src\java\com\mediatek\internal\telephony\dataconnection\DataSubSelector.java
定位到以下代码块:
private void subSelectorForOp02(Intent intent) {
........
.......
} else if (insertedSimCount == 1) { //单卡模式下
for (int i = 0; i < mPhoneNum; i++) {
if ((insertedStatus & (1 << i)) != 0) {
phoneId = i;
break;
}
}
//OP02 Case 2: Single SIM
// 1. Default Data: This sub
// 2. Data Enable: No Change
// 3. 34G: Always SIM1
log("OP02 C2: Single SIM: Set Default data to phone:" + phoneId);
setDefaultData(phoneId);
// Set data enabled for phoneId if the data of the other phone is enabled orginally
String strEnabled = "0";
if (phoneId == PhoneConstants.SIM_ID_1) {
strEnabled = TelephonyManager.getDefault().getTelephonyProperty(
PhoneConstants.SIM_ID_2, PROPERTY_MOBILE_DATA_ENABLE, "0");
} else {
strEnabled = TelephonyManager.getDefault().getTelephonyProperty(
PhoneConstants.SIM_ID_1, PROPERTY_MOBILE_DATA_ENABLE, "0");
}
if ("1".equals(strEnabled)) {
setDataEnabled(phoneId, true);
}
setDataEnabled(phoneId, false); //设置默认数据开关为关
}