插双卡时紧急号码选择的sub

TelephonyConnectionService.java
getPhoneForAccount-》getFirstPhoneForEmergencyCall

private Phone getPhoneForAccount(PhoneAccountHandle accountHandle, boolean isEmergency) {
975 Phone chosenPhone = null;
976 if (isEmergency) {
977 return PhoneFactory.getPhone(PhoneUtils.getPhoneIdForECall());
978 }
979
980 int subId = PhoneUtils.getSubIdForPhoneAccountHandle(accountHandle);
981 if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
982 int phoneId = SubscriptionController.getInstance().getPhoneId(subId);
983 chosenPhone = PhoneFactory.getPhone(phoneId);
984 }
985 // If this is an emergency call and the phone we originally planned to make this call
986 // with is not in service or was invalid, try to find one that is in service, using the
987 // default as a last chance backup.
988 if (isEmergency && (chosenPhone == null || ServiceState.STATE_IN_SERVICE != chosenPhone
989 .getServiceState().getState())) {
990 Log.d(this, "getPhoneForAccount: phone for phone acct handle %s is out of service "
991 + “or invalid for emergency call.”, accountHandle);
992 chosenPhone = getFirstPhoneForEmergencyCall();
993 Log.d(this, "getPhoneForAccount: using subId: " +
994 (chosenPhone == null ? “null” : chosenPhone.getSubId()));
995 }
996 return chosenPhone;
997 }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值