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

Commit 86cf4150 authored by Tyler Gunn's avatar Tyler Gunn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue with syncing default voice sub with Telecom." into qt-dev

parents 918556e1 e9c37e35
Loading
Loading
Loading
Loading
+11 −16
Original line number Original line Diff line number Diff line
@@ -2099,16 +2099,12 @@ public class SubscriptionController extends ISub.Stub {
        }
        }
        if (DBG) logdl("[setDefaultVoiceSubId] subId=" + subId);
        if (DBG) logdl("[setDefaultVoiceSubId] subId=" + subId);


        int previousSetting = Settings.Global.getInt(mContext.getContentResolver(),
                Settings.Global.MULTI_SIM_VOICE_CALL_SUBSCRIPTION,
                SubscriptionManager.DEFAULT_SUBSCRIPTION_ID);
        int previousDefaultSub = getDefaultSubId();
        int previousDefaultSub = getDefaultSubId();


        Settings.Global.putInt(mContext.getContentResolver(),
        Settings.Global.putInt(mContext.getContentResolver(),
                Settings.Global.MULTI_SIM_VOICE_CALL_SUBSCRIPTION, subId);
                Settings.Global.MULTI_SIM_VOICE_CALL_SUBSCRIPTION, subId);
        broadcastDefaultVoiceSubIdChanged(subId);
        broadcastDefaultVoiceSubIdChanged(subId);


        if (previousSetting != subId) {
        PhoneAccountHandle newHandle =
        PhoneAccountHandle newHandle =
                subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID
                subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID
                        ? null : mTelephonyManager.getPhoneAccountHandleForSubscriptionId(
                        ? null : mTelephonyManager.getPhoneAccountHandleForSubscriptionId(
@@ -2123,7 +2119,6 @@ public class SubscriptionController extends ISub.Stub {
        } else {
        } else {
            logd("[setDefaultVoiceSubId] default phone account not changed");
            logd("[setDefaultVoiceSubId] default phone account not changed");
        }
        }
        }


        if (previousDefaultSub != getDefaultSubId()) {
        if (previousDefaultSub != getDefaultSubId()) {
            sendDefaultChangedBroadcast(getDefaultSubId());
            sendDefaultChangedBroadcast(getDefaultSubId());