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

Commit 875357f8 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Remove _REPLACE_PENDING flag from SIM_CHANGED.

This flag is useful if the bcast is a complete snapshot of state
but in multisim it's only half of the story and was causing us
to lose state info when different sim bcasts were close together.

This should be thought about and/or reverted in the future (b/19100123).

bug:18947244
Change-Id: I912274b215d41665a8c179d74aa7f1b897985799
parent 1bb79c7f
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -548,8 +548,12 @@ public class SubscriptionInfoUpdater extends Handler {

    private void broadcastSimStateChanged(int slotId, String state, String reason) {
        Intent i = new Intent(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
        i.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING
                | Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
        // TODO - we'd like this intent to have a single snapshot of all sim state,
        // but until then this should not use REPLACE_PENDING or we may lose
        // information
        // i.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING
        //         | Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
        i.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
        i.putExtra(PhoneConstants.PHONE_NAME_KEY, "Phone");
        i.putExtra(IccCardConstants.INTENT_KEY_ICC_STATE, state);
        i.putExtra(IccCardConstants.INTENT_KEY_LOCKED_REASON, reason);
@@ -570,4 +574,3 @@ public class SubscriptionInfoUpdater extends Handler {
        Rlog.d(LOG_TAG, message);
    }
}
+5 −2
Original line number Diff line number Diff line
@@ -477,8 +477,11 @@ public class IccCardProxy extends Handler implements IccCard {
            }

            Intent intent = new Intent(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
            intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING
                    | Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
            // TODO - we'd like this intent to have a single snapshot of all sim state,
            // but until then this should not use REPLACE_PENDING or we may lose
            // information
            // intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING
            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
            intent.putExtra(PhoneConstants.PHONE_NAME_KEY, "Phone");
            intent.putExtra(IccCardConstants.INTENT_KEY_ICC_STATE, value);
            intent.putExtra(IccCardConstants.INTENT_KEY_LOCKED_REASON, reason);