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

Commit d274cc61 authored by chen xu's avatar chen xu Committed by Nathan Harold
Browse files

listen to correct intent extra for defaultSubIdChange

TelephonyRegistry listen for the wrong intent extra PhoneConstants.SLOT
which has been removed recently. Thus when receive default subscription
id changed event, we mistenkenly thought phone ID is invalid,
thus we never update mDefaultPhoneId and mDefaultSubId and fails to
notify listeners on default subscription

Bug: 131915645
Test: Manual
Merged-In: Ibb79e55c0756b30669cbd5c69c181f9f9c4d186b
Change-Id: Ibb79e55c0756b30669cbd5c69c181f9f9c4d186b
(cherry picked from commit addc2700)
parent f1aca7cf
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -342,7 +342,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
                Integer newDefaultSubIdObj = new Integer(intent.getIntExtra(
                        PhoneConstants.SUBSCRIPTION_KEY,
                        SubscriptionManager.getDefaultSubscriptionId()));
                int newDefaultPhoneId = intent.getIntExtra(PhoneConstants.SLOT_KEY,
                int newDefaultPhoneId = intent.getIntExtra(PhoneConstants.PHONE_KEY,
                    SubscriptionManager.getPhoneId(mDefaultSubId));
                if (DBG) {
                    log("onReceive:current mDefaultSubId=" + mDefaultSubId
@@ -1924,8 +1924,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
            pw.println("mEmergencyNumberList=" + mEmergencyNumberList);
            pw.println("mCallQuality=" + mCallQuality);
            pw.println("mCallAttributes=" + mCallAttributes);
            pw.println("mDefaultPhoneId" + mDefaultPhoneId);
            pw.println("mDefaultSubId" + mDefaultSubId);
            pw.println("mDefaultPhoneId=" + mDefaultPhoneId);
            pw.println("mDefaultSubId=" + mDefaultSubId);

            pw.decreaseIndent();