diff options
Diffstat (limited to 'src/com/android/services/telephony/TelecomAccountRegistry.java')
-rw-r--r-- | src/com/android/services/telephony/TelecomAccountRegistry.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java index 056e8cf5bf..bb02f8a64a 100644 --- a/src/com/android/services/telephony/TelecomAccountRegistry.java +++ b/src/com/android/services/telephony/TelecomAccountRegistry.java @@ -158,6 +158,7 @@ public class TelecomAccountRegistry { private boolean mIsUsingSimCallManager; private boolean mIsShowPreciseFailedCause; private final FeatureConnector<ImsManager> mImsManagerConnector; + private int mSubId; AccountEntry(Phone phone, boolean isEmergency, boolean isTest) { mPhone = phone; @@ -165,8 +166,9 @@ public class TelecomAccountRegistry { mIsTestAccount = isTest; mIsAdhocConfCapable = mPhone.isImsRegistered(); mAccount = registerPstnPhoneAccount(isEmergency, isTest); - Log.i(this, "Registered phoneAccount: %s with handle: %s", - mAccount, mAccount.getAccountHandle()); + mSubId = getSubId(); + Log.i(this, "Registered phoneAccount: %s with handle: %s, subId: %d", + mAccount, mAccount.getAccountHandle(), mSubId); mPhoneCapabilitiesNotifier = new PstnPhoneCapabilitiesNotifier((Phone) mPhone, this); mImsManagerConnector = ImsManager.getConnector( @@ -237,8 +239,8 @@ public class TelecomAccountRegistry { mImsManagerConnector.disconnect(); } - private boolean isMatched(SubscriptionInfo subInfo) { - return mPhone.getSubId() == subInfo.getSubscriptionId(); + private boolean isSameSubId(SubscriptionInfo subInfo) { + return mSubId == subInfo.getSubscriptionId(); } private void registerMmTelCapabilityCallback() { @@ -1916,7 +1918,7 @@ public class TelecomAccountRegistry { private boolean isAccountMatched(SubscriptionInfo info) { synchronized (mAccountsLock) { for (AccountEntry entry : mAccounts) { - if (entry.isMatched(info)) { + if (entry.isSameSubId(info)) { return true; } } |