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

Commit e02713e6 authored by Chen Xu's avatar Chen Xu Committed by android-build-merger
Browse files

Merge "using the correct intent extra for subId" am: 45db25d7 am: 1ae9d0bc

am: 5fa13927

Change-Id: I3054b7e14b291241d94056c9ffb9ea7af99041d1
parents e84ba87a 5fa13927
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1682,6 +1682,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
        intent.putExtras(data);
        // Pass the subscription along with the intent.
        intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId);
        intent.putExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, subId);
        intent.putExtra(PhoneConstants.SLOT_KEY, phoneId);
        mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
    }
@@ -1736,6 +1737,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
        if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
            intent.setAction(PhoneConstants.ACTION_SUBSCRIPTION_PHONE_STATE_CHANGED);
            intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId);
            intent.putExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, subId);
        }
        // If the phoneId is invalid, the broadcast is for overall call state.
        if (phoneId != SubscriptionManager.INVALID_PHONE_INDEX) {
+4 −0
Original line number Diff line number Diff line
@@ -176,6 +176,10 @@ public class PhoneConstants {

    // FIXME: This is used to pass a subId via intents, we need to look at its usage, which is
    // FIXME: extensive, and see if this should be an array of all active subId's or ...?
    /**
     * @Deprecated use {@link android.telephony.SubscriptionManager#EXTRA_SUBSCRIPTION_INDEX}
     * instead.
     */
    public static final String SUBSCRIPTION_KEY  = "subscription";

    public static final String SUB_SETTING  = "subSettings";