Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45adc7f6 authored by Brad Ebinger's avatar Brad Ebinger Committed by android-build-merger
Browse files

Make addExistingConnection MSIM aware am: 92d32918 am: bf3187aa

am: 36b9ffbd

Change-Id: I4e3fb34ec24377fe42db9f94f39788b0cc26c8fd
parents 6063e731 36b9ffbd
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -823,9 +823,18 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
                    }
                    // Allow the Sim call manager account as well, even if its disabled.
                    if (phoneAccountHandle == null && callingPhoneAccountHandle != null) {
                        if (callingPhoneAccountHandle.equals(
                                mPhoneAccountRegistrar.getSimCallManager(userHandle))) {
                            phoneAccountHandle = callingPhoneAccountHandle;
                        // Search all SIM PhoneAccounts to see if there is a SIM call manager
                        // associated with any of them and verify that the calling handle matches.
                        for (PhoneAccountHandle handle :
                                mPhoneAccountRegistrar.getSimPhoneAccounts(userHandle)) {
                            int subId = mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(
                                    handle);
                            PhoneAccountHandle connectionMgrHandle =
                                    mPhoneAccountRegistrar.getSimCallManager(subId, userHandle);
                            if (callingPhoneAccountHandle.equals(connectionMgrHandle)) {
                                phoneAccountHandle = connectionMgrHandle;
                                break;
                            }
                        }
                    }
                    if (phoneAccountHandle != null) {