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

Commit f63ed3e3 authored by Hall Liu's avatar Hall Liu
Browse files

Remove outdated TODO for ACTION_SIM_STATE_CHANGED

Remove an outdated TODO statement at the broadcast site of
ACTION_SIM_STATE_CHANGED and make it clear that no further changes
should be made to the contents of the broadcast.

Bug: 159346708
Test: N/A -- comments only.
Change-Id: I89fc8828216dd43020b251ba5dbb52f80f6dfaa8
parent f560b14e
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -1126,12 +1126,10 @@ public class SubscriptionInfoUpdater extends Handler {

    @UnsupportedAppUsage
    protected void broadcastSimStateChanged(int phoneId, String state, String reason) {
        // Note: This intent is way deprecated and is only being kept around because there's no
        // graceful way to deprecate a sticky broadcast that has a lot of listeners.
        // DO NOT add any new extras to this broadcast -- it is not protected by any permissions.
        Intent i = new Intent(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
        // 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);