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

Commit 6cd25f27 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Replace Telephony's hidden API Intents with @SystemApi Intents"

parents 57f38bb0 cc9d8c52
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -31,8 +31,6 @@ import android.telephony.TelephonyManager;
import android.util.Log;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.IccCardConstants;
import com.android.internal.telephony.TelephonyIntents;

import java.util.HashMap;
import java.util.Objects;
@@ -310,15 +308,15 @@ public class HeadsetPhoneState {
                return;
            }
            IntentFilter simStateChangedFilter =
                    new IntentFilter(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
                    new IntentFilter(Intent.ACTION_SIM_STATE_CHANGED);
            mHeadsetService.registerReceiver(new BroadcastReceiver() {
                @Override
                public void onReceive(Context context, Intent intent) {
                    if (TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(intent.getAction())) {
                    if (Intent.ACTION_SIM_STATE_CHANGED.equals(intent.getAction())) {
                        // This is a sticky broadcast, so if it's already been loaded,
                        // this'll execute immediately.
                        if (IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(
                                intent.getStringExtra(IccCardConstants.INTENT_KEY_ICC_STATE))) {
                        if (Intent.SIM_STATE_LOADED.equals(
                                intent.getStringExtra(Intent.EXTRA_SIM_STATE))) {
                            mIsSimStateLoaded = true;
                            sendDeviceStateChanged();
                            mHeadsetService.unregisterReceiver(this);