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

Commit 5a36b6e9 authored by Nancy Chen's avatar Nancy Chen
Browse files

Propagate "call with" account to Telephony layer.

When the user checks "always use this for calls", the setting should
also be saved through to SubInfoRecord.

Bug:18078232

Change-Id: I42874f16521155ed79ab72da57ca8a2d967d0179
parent e5a629ed
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
import android.telephony.PhoneNumberUtils;
import android.telephony.SubscriptionManager;
import android.content.ComponentName;
import android.content.Context;
import android.net.Uri;
@@ -217,6 +218,14 @@ public final class PhoneAccountRegistrar {
                return;
            }

            if (getPhoneAccount(accountHandle).hasCapabilities(
                    PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)) {
                // If the account selected is a SIM account, propagate down to the subscription
                // record.
                long subId = getSubscriptionIdForPhoneAccount(accountHandle);
                SubscriptionManager.setDefaultVoiceSubId(subId);
            }

            mState.defaultOutgoing = accountHandle;
        }