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

Commit 7eff443d authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #7274813: A few sticky broadcasts aren't being sent to all users

Change-Id: Ief63aa4be067618b2431c2c0fcd1d6820a348715
parent f5aea702
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import android.os.Registrant;
import android.os.RegistrantList;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.provider.Settings;
import android.provider.Settings.Secure;
import android.provider.Settings.SettingNotFoundException;
@@ -542,7 +543,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
            intent.putExtra(TelephonyIntents.EXTRA_SPN, "");
            intent.putExtra(TelephonyIntents.EXTRA_SHOW_PLMN, showPlmn);
            intent.putExtra(TelephonyIntents.EXTRA_PLMN, plmn);
            phone.getContext().sendStickyBroadcast(intent);
            phone.getContext().sendStickyBroadcastAsUser(intent, UserHandle.ALL);
        }

        mCurPlmn = plmn;
@@ -1473,7 +1474,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
        Intent intent = new Intent(TelephonyIntents.ACTION_NETWORK_SET_TIMEZONE);
        intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
        intent.putExtra("time-zone", zoneId);
        phone.getContext().sendStickyBroadcast(intent);
        phone.getContext().sendStickyBroadcastAsUser(intent, UserHandle.ALL);
    }

    /**
@@ -1488,7 +1489,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
        Intent intent = new Intent(TelephonyIntents.ACTION_NETWORK_SET_TIME);
        intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
        intent.putExtra("time", time);
        phone.getContext().sendStickyBroadcast(intent);
        phone.getContext().sendStickyBroadcastAsUser(intent, UserHandle.ALL);
    }

    private void revertToNitzTime() {
+4 −3
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ import android.os.Registrant;
import android.os.RegistrantList;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.telephony.CellInfo;
@@ -562,7 +563,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
            intent.putExtra(TelephonyIntents.EXTRA_SPN, spn);
            intent.putExtra(TelephonyIntents.EXTRA_SHOW_PLMN, showPlmn);
            intent.putExtra(TelephonyIntents.EXTRA_PLMN, plmn);
            phone.getContext().sendStickyBroadcast(intent);
            phone.getContext().sendStickyBroadcastAsUser(intent, UserHandle.ALL);
        }

        curShowSpn = showSpn;
@@ -1555,7 +1556,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
        Intent intent = new Intent(TelephonyIntents.ACTION_NETWORK_SET_TIMEZONE);
        intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
        intent.putExtra("time-zone", zoneId);
        phone.getContext().sendStickyBroadcast(intent);
        phone.getContext().sendStickyBroadcastAsUser(intent, UserHandle.ALL);
        if (DBG) {
            log("setAndBroadcastNetworkSetTimeZone: call alarm.setTimeZone and broadcast zoneId=" +
                zoneId);
@@ -1574,7 +1575,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
        Intent intent = new Intent(TelephonyIntents.ACTION_NETWORK_SET_TIME);
        intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
        intent.putExtra("time", time);
        phone.getContext().sendStickyBroadcast(intent);
        phone.getContext().sendStickyBroadcastAsUser(intent, UserHandle.ALL);
    }

    private void revertToNitzTime() {