Loading OWNERS +0 −1 Original line number Original line Diff line number Diff line Loading @@ -12,4 +12,3 @@ jayachandranc@google.com chinmayd@google.com chinmayd@google.com amruthr@google.com amruthr@google.com sasindran@google.com sasindran@google.com src/java/com/android/internal/telephony/CarrierResolver.java +27 −16 Original line number Original line Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.content.IntentFilter; import android.database.ContentObserver; import android.database.ContentObserver; import android.database.Cursor; import android.database.Cursor; import android.net.Uri; import android.net.Uri; import android.os.AsyncResult; import android.os.Handler; import android.os.Handler; import android.os.Message; import android.os.Message; import android.provider.Telephony; import android.provider.Telephony; Loading Loading @@ -164,7 +165,7 @@ public class CarrierResolver extends Handler { updateCarrierIdAndName( updateCarrierIdAndName( carrierId, carrierName != null ? carrierName : "", carrierId, carrierName != null ? carrierName : "", specificCarrierId, specificCarrierName != null ? carrierName : "", specificCarrierId, specificCarrierName != null ? carrierName : "", mnoCarrierId); mnoCarrierId, false); } } } } }; }; Loading Loading @@ -215,12 +216,12 @@ public class CarrierResolver extends Handler { handleSimAbsent(); handleSimAbsent(); break; break; case IccCardConstants.INTENT_VALUE_ICC_LOADED: case IccCardConstants.INTENT_VALUE_ICC_LOADED: handleSimLoaded(); handleSimLoaded(false); break; break; } } } } private void handleSimLoaded() { private void handleSimLoaded(boolean isSimOverride) { if (mIccRecords != null) { if (mIccRecords != null) { /** /** * returns empty string to be consistent with * returns empty string to be consistent with Loading @@ -232,7 +233,9 @@ public class CarrierResolver extends Handler { loge("mIccRecords is null on SIM_LOAD_EVENT, could not get SPN"); loge("mIccRecords is null on SIM_LOAD_EVENT, could not get SPN"); } } mPreferApn = getPreferApn(); mPreferApn = getPreferApn(); loadCarrierMatchingRulesOnMccMnc(false /* update carrier config */); loadCarrierMatchingRulesOnMccMnc( false /* update carrier config */, isSimOverride); } } private void handleSimAbsent() { private void handleSimAbsent() { Loading @@ -241,7 +244,7 @@ public class CarrierResolver extends Handler { mPreferApn = null; mPreferApn = null; updateCarrierIdAndName(TelephonyManager.UNKNOWN_CARRIER_ID, null, updateCarrierIdAndName(TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID); TelephonyManager.UNKNOWN_CARRIER_ID, false); } } private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() { private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() { Loading Loading @@ -274,19 +277,24 @@ public class CarrierResolver extends Handler { if (DBG) logd("handleMessage: " + msg.what); if (DBG) logd("handleMessage: " + msg.what); switch (msg.what) { switch (msg.what) { case SIM_LOAD_EVENT: case SIM_LOAD_EVENT: handleSimLoaded(); AsyncResult result = (AsyncResult) msg.obj; boolean isSimOverride = false; if (result != null) { isSimOverride = result.userObj instanceof Boolean && (Boolean) result.userObj; } handleSimLoaded(isSimOverride); break; break; case CARRIER_ID_DB_UPDATE_EVENT: case CARRIER_ID_DB_UPDATE_EVENT: // clean the cached carrier list version, so that a new one will be queried. // clean the cached carrier list version, so that a new one will be queried. mCarrierListVersion = null; mCarrierListVersion = null; loadCarrierMatchingRulesOnMccMnc(true /* update carrier config*/); loadCarrierMatchingRulesOnMccMnc(true /* update carrier config*/, false); break; break; case PREFER_APN_UPDATE_EVENT: case PREFER_APN_UPDATE_EVENT: String preferApn = getPreferApn(); String preferApn = getPreferApn(); if (!equals(mPreferApn, preferApn, true)) { if (!equals(mPreferApn, preferApn, true)) { logd("[updatePreferApn] from:" + mPreferApn + " to:" + preferApn); logd("[updatePreferApn] from:" + mPreferApn + " to:" + preferApn); mPreferApn = preferApn; mPreferApn = preferApn; matchSubscriptionCarrier(true /* update carrier config*/); matchSubscriptionCarrier(true /* update carrier config*/, false); } } break; break; case ICC_CHANGED_EVENT: case ICC_CHANGED_EVENT: Loading @@ -301,7 +309,8 @@ public class CarrierResolver extends Handler { } } if (newIccRecords != null) { if (newIccRecords != null) { logd("new Icc object"); logd("new Icc object"); newIccRecords.registerForRecordsOverride(this, SIM_LOAD_EVENT, null); newIccRecords.registerForRecordsOverride(this, SIM_LOAD_EVENT, /* is sim override*/true); mIccRecords = newIccRecords; mIccRecords = newIccRecords; } } } } Loading @@ -312,7 +321,9 @@ public class CarrierResolver extends Handler { } } } } private void loadCarrierMatchingRulesOnMccMnc(boolean updateCarrierConfig) { private void loadCarrierMatchingRulesOnMccMnc( boolean updateCarrierConfig, boolean isSimOverride) { try { try { String mccmnc = mTelephonyMgr.getSimOperatorNumericForPhone(mPhone.getPhoneId()); String mccmnc = mTelephonyMgr.getSimOperatorNumericForPhone(mPhone.getPhoneId()); Cursor cursor = mContext.getContentResolver().query( Cursor cursor = mContext.getContentResolver().query( Loading @@ -330,7 +341,7 @@ public class CarrierResolver extends Handler { while (cursor.moveToNext()) { while (cursor.moveToNext()) { mCarrierMatchingRulesOnMccMnc.add(makeCarrierMatchingRule(cursor)); mCarrierMatchingRulesOnMccMnc.add(makeCarrierMatchingRule(cursor)); } } matchSubscriptionCarrier(updateCarrierConfig); matchSubscriptionCarrier(updateCarrierConfig, isSimOverride); // Generate metrics related to carrier ID table version. // Generate metrics related to carrier ID table version. CarrierIdMatchStats.sendCarrierIdTableVersion(getCarrierListVersion()); CarrierIdMatchStats.sendCarrierIdTableVersion(getCarrierListVersion()); Loading Loading @@ -465,7 +476,7 @@ public class CarrierResolver extends Handler { private void updateCarrierIdAndName(int cid, String name, private void updateCarrierIdAndName(int cid, String name, int specificCarrierId, String specificCarrierName, int specificCarrierId, String specificCarrierName, int mnoCid) { int mnoCid, boolean isSimOverride) { boolean update = false; boolean update = false; if (specificCarrierId != mSpecificCarrierId) { if (specificCarrierId != mSpecificCarrierId) { logd("[updateSpecificCarrierId] from:" + mSpecificCarrierId + " to:" logd("[updateSpecificCarrierId] from:" + mSpecificCarrierId + " to:" Loading Loading @@ -534,7 +545,7 @@ public class CarrierResolver extends Handler { // during esim profile switch, there is no sim absent thus carrier id will persist and // during esim profile switch, there is no sim absent thus carrier id will persist and // might not trigger an update if switch profiles for the same carrier. thus always update // might not trigger an update if switch profiles for the same carrier. thus always update // subscriptioninfo db to make sure we have correct carrier id set. // subscriptioninfo db to make sure we have correct carrier id set. if (SubscriptionManager.isValidSubscriptionId(mPhone.getSubId())) { if (SubscriptionManager.isValidSubscriptionId(mPhone.getSubId()) && !isSimOverride) { // only persist carrier id to simInfo db when subId is valid. // only persist carrier id to simInfo db when subId is valid. SubscriptionController.getInstance().setCarrierId(mCarrierId, mPhone.getSubId()); SubscriptionController.getInstance().setCarrierId(mCarrierId, mPhone.getSubId()); } } Loading Loading @@ -827,7 +838,7 @@ public class CarrierResolver extends Handler { /** /** * find the best matching carrier from candidates with matched subscription MCCMNC. * find the best matching carrier from candidates with matched subscription MCCMNC. */ */ private void matchSubscriptionCarrier(boolean updateCarrierConfig) { private void matchSubscriptionCarrier(boolean updateCarrierConfig, boolean isSimOverride) { if (!SubscriptionManager.isValidSubscriptionId(mPhone.getSubId())) { if (!SubscriptionManager.isValidSubscriptionId(mPhone.getSubId())) { logd("[matchSubscriptionCarrier]" + "skip before sim records loaded"); logd("[matchSubscriptionCarrier]" + "skip before sim records loaded"); return; return; Loading Loading @@ -870,7 +881,7 @@ public class CarrierResolver extends Handler { + " name: " + null); + " name: " + null); updateCarrierIdAndName(TelephonyManager.UNKNOWN_CARRIER_ID, null, updateCarrierIdAndName(TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID); TelephonyManager.UNKNOWN_CARRIER_ID, isSimOverride); } else { } else { // if there is a single matching result, check if this rule has parent cid assigned. // if there is a single matching result, check if this rule has parent cid assigned. if ((maxRule == maxRuleParent) if ((maxRule == maxRuleParent) Loading @@ -884,7 +895,7 @@ public class CarrierResolver extends Handler { + " name: " + maxRuleParent.mName); + " name: " + maxRuleParent.mName); updateCarrierIdAndName(maxRuleParent.mCid, maxRuleParent.mName, updateCarrierIdAndName(maxRuleParent.mCid, maxRuleParent.mName, maxRule.mCid, maxRule.mName, maxRule.mCid, maxRule.mName, (mnoRule == null) ? maxRule.mCid : mnoRule.mCid); (mnoRule == null) ? maxRule.mCid : mnoRule.mCid, isSimOverride); if (updateCarrierConfig) { if (updateCarrierConfig) { logd("[matchSubscriptionCarrier] - Calling updateCarrierConfig()"); logd("[matchSubscriptionCarrier] - Calling updateCarrierConfig()"); Loading src/java/com/android/internal/telephony/CommandsInterface.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -2205,6 +2205,15 @@ public interface CommandsInterface { public void setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, public void setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, Message result); Message result); /** * Whether the device modem supports reporting the EID in either the slot or card status or * through ATR. * @return true if the modem supports EID. */ default boolean supportsEid() { return false; } /** /** * Tells the modem if data is allowed or not. * Tells the modem if data is allowed or not. * * Loading src/java/com/android/internal/telephony/GsmCdmaConnection.java +12 −7 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,7 @@ import com.android.internal.telephony.uicc.UiccCardApplication; import com.android.telephony.Rlog; import com.android.telephony.Rlog; import java.util.ArrayList; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; /** /** * {@hide} * {@hide} Loading Loading @@ -141,7 +141,10 @@ public class GsmCdmaConnection extends Connection { mAddress = dc.number; mAddress = dc.number; setEmergencyCallInfo(mOwner); setEmergencyCallInfo(mOwner); mForwardedNumber = new ArrayList<String>(Arrays.asList(dc.forwardedNumber)); String forwardedNumber = TextUtils.isEmpty(dc.forwardedNumber) ? null : dc.forwardedNumber; Rlog.i(LOG_TAG, "create, forwardedNumber=" + Rlog.pii(LOG_TAG, forwardedNumber)); mForwardedNumber = forwardedNumber == null ? null : new ArrayList<>(Collections.singletonList(dc.forwardedNumber)); mIsIncoming = dc.isMT; mIsIncoming = dc.isMT; mCreateTime = System.currentTimeMillis(); mCreateTime = System.currentTimeMillis(); mCnapName = dc.name; mCnapName = dc.name; Loading Loading @@ -710,11 +713,13 @@ public class GsmCdmaConnection extends Connection { mOwner.getPhone().getVoiceCallSessionStats().onAudioCodecChanged(this, dc.audioQuality); mOwner.getPhone().getVoiceCallSessionStats().onAudioCodecChanged(this, dc.audioQuality); } } ArrayList<String> forwardedNumber = String forwardedNumber = TextUtils.isEmpty(dc.forwardedNumber) ? null : dc.forwardedNumber; new ArrayList<String>(Arrays.asList(dc.forwardedNumber)); Rlog.i(LOG_TAG, "update: forwardedNumber=" + Rlog.pii(LOG_TAG, forwardedNumber)); if (!equalsHandlesNulls(mForwardedNumber, forwardedNumber)) { ArrayList<String> forwardedNumbers = forwardedNumber == null ? null : if (Phone.DEBUG_PHONE) log("update: mForwardedNumber, # changed!"); new ArrayList<>(Collections.singletonList(dc.forwardedNumber)); mForwardedNumber = forwardedNumber; if (!equalsHandlesNulls(mForwardedNumber, forwardedNumbers)) { if (Phone.DEBUG_PHONE) log("update: mForwardedNumber, # changed"); mForwardedNumber = forwardedNumbers; changed = true; changed = true; } } Loading src/java/com/android/internal/telephony/InboundSmsHandler.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static android.service.carrier.CarrierMessagingService.RECEIVE_OPTIONS_SK import static android.telephony.TelephonyManager.PHONE_TYPE_CDMA; import static android.telephony.TelephonyManager.PHONE_TYPE_CDMA; import android.annotation.IntDef; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.Nullable; import android.app.Activity; import android.app.Activity; import android.app.AppOpsManager; import android.app.AppOpsManager; Loading Loading @@ -1704,10 +1705,15 @@ public abstract class InboundSmsHandler extends StateMachine { @Override @Override public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) { if (intent == null) { logeWithLocalLog("onReceive: received null intent, faking " + mWaitingForIntent, mInboundSmsTracker.getMessageId()); return; } handleAction(intent, true); handleAction(intent, true); } } private synchronized void handleAction(Intent intent, boolean onReceive) { private synchronized void handleAction(@NonNull Intent intent, boolean onReceive) { String action = intent.getAction(); String action = intent.getAction(); if (mWaitingForIntent == null || !mWaitingForIntent.getAction().equals(action)) { if (mWaitingForIntent == null || !mWaitingForIntent.getAction().equals(action)) { logeWithLocalLog("handleAction: Received " + action + " when expecting " logeWithLocalLog("handleAction: Received " + action + " when expecting " Loading Loading
OWNERS +0 −1 Original line number Original line Diff line number Diff line Loading @@ -12,4 +12,3 @@ jayachandranc@google.com chinmayd@google.com chinmayd@google.com amruthr@google.com amruthr@google.com sasindran@google.com sasindran@google.com
src/java/com/android/internal/telephony/CarrierResolver.java +27 −16 Original line number Original line Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.content.IntentFilter; import android.database.ContentObserver; import android.database.ContentObserver; import android.database.Cursor; import android.database.Cursor; import android.net.Uri; import android.net.Uri; import android.os.AsyncResult; import android.os.Handler; import android.os.Handler; import android.os.Message; import android.os.Message; import android.provider.Telephony; import android.provider.Telephony; Loading Loading @@ -164,7 +165,7 @@ public class CarrierResolver extends Handler { updateCarrierIdAndName( updateCarrierIdAndName( carrierId, carrierName != null ? carrierName : "", carrierId, carrierName != null ? carrierName : "", specificCarrierId, specificCarrierName != null ? carrierName : "", specificCarrierId, specificCarrierName != null ? carrierName : "", mnoCarrierId); mnoCarrierId, false); } } } } }; }; Loading Loading @@ -215,12 +216,12 @@ public class CarrierResolver extends Handler { handleSimAbsent(); handleSimAbsent(); break; break; case IccCardConstants.INTENT_VALUE_ICC_LOADED: case IccCardConstants.INTENT_VALUE_ICC_LOADED: handleSimLoaded(); handleSimLoaded(false); break; break; } } } } private void handleSimLoaded() { private void handleSimLoaded(boolean isSimOverride) { if (mIccRecords != null) { if (mIccRecords != null) { /** /** * returns empty string to be consistent with * returns empty string to be consistent with Loading @@ -232,7 +233,9 @@ public class CarrierResolver extends Handler { loge("mIccRecords is null on SIM_LOAD_EVENT, could not get SPN"); loge("mIccRecords is null on SIM_LOAD_EVENT, could not get SPN"); } } mPreferApn = getPreferApn(); mPreferApn = getPreferApn(); loadCarrierMatchingRulesOnMccMnc(false /* update carrier config */); loadCarrierMatchingRulesOnMccMnc( false /* update carrier config */, isSimOverride); } } private void handleSimAbsent() { private void handleSimAbsent() { Loading @@ -241,7 +244,7 @@ public class CarrierResolver extends Handler { mPreferApn = null; mPreferApn = null; updateCarrierIdAndName(TelephonyManager.UNKNOWN_CARRIER_ID, null, updateCarrierIdAndName(TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID); TelephonyManager.UNKNOWN_CARRIER_ID, false); } } private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() { private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() { Loading Loading @@ -274,19 +277,24 @@ public class CarrierResolver extends Handler { if (DBG) logd("handleMessage: " + msg.what); if (DBG) logd("handleMessage: " + msg.what); switch (msg.what) { switch (msg.what) { case SIM_LOAD_EVENT: case SIM_LOAD_EVENT: handleSimLoaded(); AsyncResult result = (AsyncResult) msg.obj; boolean isSimOverride = false; if (result != null) { isSimOverride = result.userObj instanceof Boolean && (Boolean) result.userObj; } handleSimLoaded(isSimOverride); break; break; case CARRIER_ID_DB_UPDATE_EVENT: case CARRIER_ID_DB_UPDATE_EVENT: // clean the cached carrier list version, so that a new one will be queried. // clean the cached carrier list version, so that a new one will be queried. mCarrierListVersion = null; mCarrierListVersion = null; loadCarrierMatchingRulesOnMccMnc(true /* update carrier config*/); loadCarrierMatchingRulesOnMccMnc(true /* update carrier config*/, false); break; break; case PREFER_APN_UPDATE_EVENT: case PREFER_APN_UPDATE_EVENT: String preferApn = getPreferApn(); String preferApn = getPreferApn(); if (!equals(mPreferApn, preferApn, true)) { if (!equals(mPreferApn, preferApn, true)) { logd("[updatePreferApn] from:" + mPreferApn + " to:" + preferApn); logd("[updatePreferApn] from:" + mPreferApn + " to:" + preferApn); mPreferApn = preferApn; mPreferApn = preferApn; matchSubscriptionCarrier(true /* update carrier config*/); matchSubscriptionCarrier(true /* update carrier config*/, false); } } break; break; case ICC_CHANGED_EVENT: case ICC_CHANGED_EVENT: Loading @@ -301,7 +309,8 @@ public class CarrierResolver extends Handler { } } if (newIccRecords != null) { if (newIccRecords != null) { logd("new Icc object"); logd("new Icc object"); newIccRecords.registerForRecordsOverride(this, SIM_LOAD_EVENT, null); newIccRecords.registerForRecordsOverride(this, SIM_LOAD_EVENT, /* is sim override*/true); mIccRecords = newIccRecords; mIccRecords = newIccRecords; } } } } Loading @@ -312,7 +321,9 @@ public class CarrierResolver extends Handler { } } } } private void loadCarrierMatchingRulesOnMccMnc(boolean updateCarrierConfig) { private void loadCarrierMatchingRulesOnMccMnc( boolean updateCarrierConfig, boolean isSimOverride) { try { try { String mccmnc = mTelephonyMgr.getSimOperatorNumericForPhone(mPhone.getPhoneId()); String mccmnc = mTelephonyMgr.getSimOperatorNumericForPhone(mPhone.getPhoneId()); Cursor cursor = mContext.getContentResolver().query( Cursor cursor = mContext.getContentResolver().query( Loading @@ -330,7 +341,7 @@ public class CarrierResolver extends Handler { while (cursor.moveToNext()) { while (cursor.moveToNext()) { mCarrierMatchingRulesOnMccMnc.add(makeCarrierMatchingRule(cursor)); mCarrierMatchingRulesOnMccMnc.add(makeCarrierMatchingRule(cursor)); } } matchSubscriptionCarrier(updateCarrierConfig); matchSubscriptionCarrier(updateCarrierConfig, isSimOverride); // Generate metrics related to carrier ID table version. // Generate metrics related to carrier ID table version. CarrierIdMatchStats.sendCarrierIdTableVersion(getCarrierListVersion()); CarrierIdMatchStats.sendCarrierIdTableVersion(getCarrierListVersion()); Loading Loading @@ -465,7 +476,7 @@ public class CarrierResolver extends Handler { private void updateCarrierIdAndName(int cid, String name, private void updateCarrierIdAndName(int cid, String name, int specificCarrierId, String specificCarrierName, int specificCarrierId, String specificCarrierName, int mnoCid) { int mnoCid, boolean isSimOverride) { boolean update = false; boolean update = false; if (specificCarrierId != mSpecificCarrierId) { if (specificCarrierId != mSpecificCarrierId) { logd("[updateSpecificCarrierId] from:" + mSpecificCarrierId + " to:" logd("[updateSpecificCarrierId] from:" + mSpecificCarrierId + " to:" Loading Loading @@ -534,7 +545,7 @@ public class CarrierResolver extends Handler { // during esim profile switch, there is no sim absent thus carrier id will persist and // during esim profile switch, there is no sim absent thus carrier id will persist and // might not trigger an update if switch profiles for the same carrier. thus always update // might not trigger an update if switch profiles for the same carrier. thus always update // subscriptioninfo db to make sure we have correct carrier id set. // subscriptioninfo db to make sure we have correct carrier id set. if (SubscriptionManager.isValidSubscriptionId(mPhone.getSubId())) { if (SubscriptionManager.isValidSubscriptionId(mPhone.getSubId()) && !isSimOverride) { // only persist carrier id to simInfo db when subId is valid. // only persist carrier id to simInfo db when subId is valid. SubscriptionController.getInstance().setCarrierId(mCarrierId, mPhone.getSubId()); SubscriptionController.getInstance().setCarrierId(mCarrierId, mPhone.getSubId()); } } Loading Loading @@ -827,7 +838,7 @@ public class CarrierResolver extends Handler { /** /** * find the best matching carrier from candidates with matched subscription MCCMNC. * find the best matching carrier from candidates with matched subscription MCCMNC. */ */ private void matchSubscriptionCarrier(boolean updateCarrierConfig) { private void matchSubscriptionCarrier(boolean updateCarrierConfig, boolean isSimOverride) { if (!SubscriptionManager.isValidSubscriptionId(mPhone.getSubId())) { if (!SubscriptionManager.isValidSubscriptionId(mPhone.getSubId())) { logd("[matchSubscriptionCarrier]" + "skip before sim records loaded"); logd("[matchSubscriptionCarrier]" + "skip before sim records loaded"); return; return; Loading Loading @@ -870,7 +881,7 @@ public class CarrierResolver extends Handler { + " name: " + null); + " name: " + null); updateCarrierIdAndName(TelephonyManager.UNKNOWN_CARRIER_ID, null, updateCarrierIdAndName(TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID, null, TelephonyManager.UNKNOWN_CARRIER_ID); TelephonyManager.UNKNOWN_CARRIER_ID, isSimOverride); } else { } else { // if there is a single matching result, check if this rule has parent cid assigned. // if there is a single matching result, check if this rule has parent cid assigned. if ((maxRule == maxRuleParent) if ((maxRule == maxRuleParent) Loading @@ -884,7 +895,7 @@ public class CarrierResolver extends Handler { + " name: " + maxRuleParent.mName); + " name: " + maxRuleParent.mName); updateCarrierIdAndName(maxRuleParent.mCid, maxRuleParent.mName, updateCarrierIdAndName(maxRuleParent.mCid, maxRuleParent.mName, maxRule.mCid, maxRule.mName, maxRule.mCid, maxRule.mName, (mnoRule == null) ? maxRule.mCid : mnoRule.mCid); (mnoRule == null) ? maxRule.mCid : mnoRule.mCid, isSimOverride); if (updateCarrierConfig) { if (updateCarrierConfig) { logd("[matchSubscriptionCarrier] - Calling updateCarrierConfig()"); logd("[matchSubscriptionCarrier] - Calling updateCarrierConfig()"); Loading
src/java/com/android/internal/telephony/CommandsInterface.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -2205,6 +2205,15 @@ public interface CommandsInterface { public void setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, public void setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, Message result); Message result); /** * Whether the device modem supports reporting the EID in either the slot or card status or * through ATR. * @return true if the modem supports EID. */ default boolean supportsEid() { return false; } /** /** * Tells the modem if data is allowed or not. * Tells the modem if data is allowed or not. * * Loading
src/java/com/android/internal/telephony/GsmCdmaConnection.java +12 −7 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,7 @@ import com.android.internal.telephony.uicc.UiccCardApplication; import com.android.telephony.Rlog; import com.android.telephony.Rlog; import java.util.ArrayList; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; /** /** * {@hide} * {@hide} Loading Loading @@ -141,7 +141,10 @@ public class GsmCdmaConnection extends Connection { mAddress = dc.number; mAddress = dc.number; setEmergencyCallInfo(mOwner); setEmergencyCallInfo(mOwner); mForwardedNumber = new ArrayList<String>(Arrays.asList(dc.forwardedNumber)); String forwardedNumber = TextUtils.isEmpty(dc.forwardedNumber) ? null : dc.forwardedNumber; Rlog.i(LOG_TAG, "create, forwardedNumber=" + Rlog.pii(LOG_TAG, forwardedNumber)); mForwardedNumber = forwardedNumber == null ? null : new ArrayList<>(Collections.singletonList(dc.forwardedNumber)); mIsIncoming = dc.isMT; mIsIncoming = dc.isMT; mCreateTime = System.currentTimeMillis(); mCreateTime = System.currentTimeMillis(); mCnapName = dc.name; mCnapName = dc.name; Loading Loading @@ -710,11 +713,13 @@ public class GsmCdmaConnection extends Connection { mOwner.getPhone().getVoiceCallSessionStats().onAudioCodecChanged(this, dc.audioQuality); mOwner.getPhone().getVoiceCallSessionStats().onAudioCodecChanged(this, dc.audioQuality); } } ArrayList<String> forwardedNumber = String forwardedNumber = TextUtils.isEmpty(dc.forwardedNumber) ? null : dc.forwardedNumber; new ArrayList<String>(Arrays.asList(dc.forwardedNumber)); Rlog.i(LOG_TAG, "update: forwardedNumber=" + Rlog.pii(LOG_TAG, forwardedNumber)); if (!equalsHandlesNulls(mForwardedNumber, forwardedNumber)) { ArrayList<String> forwardedNumbers = forwardedNumber == null ? null : if (Phone.DEBUG_PHONE) log("update: mForwardedNumber, # changed!"); new ArrayList<>(Collections.singletonList(dc.forwardedNumber)); mForwardedNumber = forwardedNumber; if (!equalsHandlesNulls(mForwardedNumber, forwardedNumbers)) { if (Phone.DEBUG_PHONE) log("update: mForwardedNumber, # changed"); mForwardedNumber = forwardedNumbers; changed = true; changed = true; } } Loading
src/java/com/android/internal/telephony/InboundSmsHandler.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static android.service.carrier.CarrierMessagingService.RECEIVE_OPTIONS_SK import static android.telephony.TelephonyManager.PHONE_TYPE_CDMA; import static android.telephony.TelephonyManager.PHONE_TYPE_CDMA; import android.annotation.IntDef; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.Nullable; import android.app.Activity; import android.app.Activity; import android.app.AppOpsManager; import android.app.AppOpsManager; Loading Loading @@ -1704,10 +1705,15 @@ public abstract class InboundSmsHandler extends StateMachine { @Override @Override public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) { if (intent == null) { logeWithLocalLog("onReceive: received null intent, faking " + mWaitingForIntent, mInboundSmsTracker.getMessageId()); return; } handleAction(intent, true); handleAction(intent, true); } } private synchronized void handleAction(Intent intent, boolean onReceive) { private synchronized void handleAction(@NonNull Intent intent, boolean onReceive) { String action = intent.getAction(); String action = intent.getAction(); if (mWaitingForIntent == null || !mWaitingForIntent.getAction().equals(action)) { if (mWaitingForIntent == null || !mWaitingForIntent.getAction().equals(action)) { logeWithLocalLog("handleAction: Received " + action + " when expecting " logeWithLocalLog("handleAction: Received " + action + " when expecting " Loading