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

Commit 92222839 authored by Meng Wang's avatar Meng Wang Committed by Gerrit Code Review
Browse files

Merge "Use Intent.EXTRA_REBROADCAST_ON_UNLOCK instead of hidden API"

parents ca458963 0e8d91a2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1061,7 +1061,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
                // keep compatibility with apps that aren't direct boot aware.
                // SysUI should just ignore this broadcast because it was already received
                // and processed previously.
                if (intent.getBooleanExtra(TelephonyIntents.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
                if (intent.getBooleanExtra(Intent.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
                    // Guarantee mTelephonyCapable state after SysUI crash and restart
                    if (args.simState == State.ABSENT) {
                        mHandler.obtainMessage(MSG_TELEPHONY_CAPABLE, true).sendToTarget();
+1 −2
Original line number Diff line number Diff line
@@ -605,8 +605,7 @@ public class PhoneStatusBarPolicy
                    break;
                case TelephonyIntents.ACTION_SIM_STATE_CHANGED:
                    // Avoid rebroadcast because SysUI is direct boot aware.
                    if (intent.getBooleanExtra(TelephonyIntents.EXTRA_REBROADCAST_ON_UNLOCK,
                            false)) {
                    if (intent.getBooleanExtra(Intent.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
                        break;
                    }
                    updateSimState(intent);
+1 −1
Original line number Diff line number Diff line
@@ -517,7 +517,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
                break;
            case TelephonyIntents.ACTION_SIM_STATE_CHANGED:
                // Avoid rebroadcast because SysUI is direct boot aware.
                if (intent.getBooleanExtra(TelephonyIntents.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
                if (intent.getBooleanExtra(Intent.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
                    break;
                }
                // Might have different subscriptions now.
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
        Assert.assertTrue("onSimStateChanged not called",
                mKeyguardUpdateMonitor.hasSimStateJustChanged());

        intent.putExtra(TelephonyIntents.EXTRA_REBROADCAST_ON_UNLOCK, true);
        intent.putExtra(Intent.EXTRA_REBROADCAST_ON_UNLOCK, true);
        mKeyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext(), intent);
        mTestableLooper.processAllMessages();
        Assert.assertFalse("onSimStateChanged should have been skipped",
+0 −2
Original line number Diff line number Diff line
@@ -205,8 +205,6 @@ public class TelephonyIntents {
    public static final String ACTION_SIM_STATE_CHANGED
            = Intent.ACTION_SIM_STATE_CHANGED;

    public static final String EXTRA_REBROADCAST_ON_UNLOCK= "rebroadcastOnUnlock";

    /**
     * <p>Broadcast Action: It indicates the Emergency callback mode blocks datacall/sms
     * <p class="note">.