diff options
author | Umashankar Godachi <quic_umasha@quicinc.com> | 2022-03-07 21:32:21 +0530 |
---|---|---|
committer | Umashankar Godachi <quic_umasha@quicinc.com> | 2022-03-22 00:41:11 +0530 |
commit | 9c656144975c445e348e40ee6d070f8f39280817 (patch) | |
tree | 292bcbf94359b7e9695a8e2e6a9af1c521a12f1a | |
parent | 2fb5300bcc90a2799a52d105aac4b4f5cb3beae5 (diff) |
Fix voice call preference changing to different slot
On a Subsidy lock enabled device, it is seen that till
the subsidy carrier sim latches to network, the other
sim stays in perso locked state, due to this subsidy
carrier sim always initialized first when compared to
non-subsidy sim. This is resulting in voice preference
getting set to subsidy carrier sim.
Change-Id: I6c387bc7309e149d77cc564a557eadf247e84938
CRs-Fixed: 3140714
-rw-r--r-- | src/com/android/services/telephony/TelecomAccountRegistry.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java index 513072019a..290326ebc3 100644 --- a/src/com/android/services/telephony/TelecomAccountRegistry.java +++ b/src/com/android/services/telephony/TelecomAccountRegistry.java @@ -1734,7 +1734,8 @@ public class TelecomAccountRegistry { if ((defaultPhoneAccount == null) && (mTelephonyManager.getActiveModemCount() > Count.ONE.ordinal()) && (activeCount == Count.ONE.ordinal()) - && (areAllSimAccountsFound()) && (isRadioInValidState(phones))) { + && (areAllSimAccountsFound()) && (isRadioInValidState(phones)) + && !isSubIdCreationPending()) { PhoneAccountHandle phoneAccountHandle = subscriptionIdToPhoneAccountHandle(activeSubscriptionId); if (phoneAccountHandle != null) { @@ -1745,6 +1746,17 @@ public class TelecomAccountRegistry { } } + private boolean isSubIdCreationPending() { + Log.i(this, "isSubIdCreationPending"); + SubscriptionController subController = SubscriptionController.getInstance(); + + if (subController == null) { + Log.i(this, "isSubIdCreationPending: SubscriptionController instance is null"); + return false; + } + return subController.isSubIdCreationPending(); + } + private boolean areAllSimAccountsFound() { final Iterator<PhoneAccountHandle> phoneAccounts = mTelecomManager.getCallCapablePhoneAccounts().listIterator(); |