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

Commit d17f611f authored by Malcolm Chen's avatar Malcolm Chen
Browse files

Move intents ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED,

ACTION_DEFAULT_SUBSCRIPTION_CHANGED and EXTRA_SUBSCRIPTION_INDEX
from Intent class to SubscriptionManager class.

Bug: 37497166
Test: Manual
Change-Id: Ifeedf974328cd3d839d7f66bf41a91c479d66316
parent 48d4becf
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.text.format.Time;
import android.util.Log;
import java.util.Objects;

import com.android.internal.telephony.IccCardConstants.State;

import java.io.FileDescriptor;
@@ -51,6 +51,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

@@ -1343,11 +1344,11 @@ public class SubscriptionController extends ISub.Stub {
    private void broadcastDefaultSmsSubIdChanged(int subId) {
        // Broadcast an Intent for default sms sub change
        if (DBG) logdl("[broadcastDefaultSmsSubIdChanged] subId=" + subId);
        Intent intent = new Intent(Intent.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED);
        Intent intent = new Intent(SubscriptionManager.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED);
        intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING
                | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
        intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId);
        intent.putExtra(Intent.EXTRA_SUBSCRIPTION_INDEX, subId);
        intent.putExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, subId);
        mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
    }