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

Commit 721467c6 authored by Daniel Bright's avatar Daniel Bright
Browse files

Repoint ACTION_SECRET_CODE + ACTION_SIM_STATE_CHANGED

Bug: 148160428
Test: make, flash
Change-Id: I9404e2c3c816311c7ef3875622fe5cd5a315ec58
parent 105624cf
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ import android.widget.Toast;
import androidx.preference.Preference;
import androidx.preference.SwitchPreference;

import com.android.internal.telephony.TelephonyIntents;
import com.android.settings.network.ProxySubscriptionManager;

import java.util.List;
@@ -143,7 +142,7 @@ public class IccLockSettings extends SettingsPreferenceFragment
    private final BroadcastReceiver mSimStateReceiver = new BroadcastReceiver() {
        public void onReceive(Context context, Intent intent) {
            final String action = intent.getAction();
            if (TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(action)) {
            if (Intent.ACTION_SIM_STATE_CHANGED.equals(action)) {
                mHandler.sendMessage(mHandler.obtainMessage(MSG_SIM_STATE_CHANGED));
            }
        }
@@ -293,7 +292,7 @@ public class IccLockSettings extends SettingsPreferenceFragment

        // ACTION_SIM_STATE_CHANGED is sticky, so we'll receive current state after this call,
        // which will call updatePreferences().
        final IntentFilter filter = new IntentFilter(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
        final IntentFilter filter = new IntentFilter(Intent.ACTION_SIM_STATE_CHANGED);
        getContext().registerReceiver(mSimStateReceiver, filter);

        if (mDialogState != OFF_MODE) {
+4 −5
Original line number Diff line number Diff line
package com.android.settings;

import static com.android.internal.telephony.TelephonyIntents.SECRET_CODE_ACTION;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;

import com.android.settings.Settings.TestingSettingsActivity;

@@ -16,7 +15,7 @@ public class TestingSettingsBroadcastReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals(SECRET_CODE_ACTION)) {
        if (intent.getAction().equals(TelephonyManager.ACTION_SECRET_CODE)) {
            Intent i = new Intent(Intent.ACTION_MAIN);
            i.setClass(context, TestingSettingsActivity.class);
            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);