diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-01-20 23:24:43 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-01-20 23:24:43 +0000 |
commit | 754dba3bd84fbb031fe361d4736c6bb74da6d05d (patch) | |
tree | b9cf327bed59a0115b5603745d79829e3d1cd1fd | |
parent | 9cd57b6ea3f6d1db9bcb9d0d601f4546adeb32a0 (diff) | |
parent | caee3fdac3eea22e79bf137774552a4921d87803 (diff) |
Snap for 9511900 from caee3fdac3eea22e79bf137774552a4921d87803 to t-keystone-qcom-release
Change-Id: I8022ccc40d720ce799a7f1d5f74543bd8d2616e5
-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; } } |