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

Commit f068636d authored by Will Osborn's avatar Will Osborn
Browse files

Revert "Replace Context#sendStickyBroadcastAsUser()"

This reverts commit 40b2df50.

Reason for revert: DroidMonitor: Potential culprit for Bug http://b/178367782 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: I7fd74bf481febf1cba8b6c8fbf01c4908f847606
parent 40b2df50
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -314,8 +314,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
    private boolean mRestrictBackground;

    private final Context mContext;
    // The Context is created for UserHandle.ALL.
    private final Context mUserAllContext;
    private final Dependencies mDeps;
    // 0 is full bad, 100 is full good
    private int mDefaultInetConditionPublished = 0;
@@ -1090,8 +1088,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
        intentFilter.addAction(Intent.ACTION_USER_REMOVED);
        intentFilter.addAction(Intent.ACTION_USER_UNLOCKED);

        mUserAllContext = mContext.createContextAsUser(UserHandle.ALL, 0 /* flags */);
        mUserAllContext.registerReceiver(
        final Context userAllContext = mContext.createContextAsUser(UserHandle.ALL, 0 /* flags */);
        userAllContext.registerReceiver(
                mIntentReceiver,
                intentFilter,
                null /* broadcastPermission */,
@@ -1107,7 +1105,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
        intentFilter.addAction(Intent.ACTION_PACKAGE_REPLACED);
        intentFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);
        intentFilter.addDataScheme("package");
        mUserAllContext.registerReceiver(
        userAllContext.registerReceiver(
                mIntentReceiver,
                intentFilter,
                null /* broadcastPermission */,
@@ -1116,7 +1114,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
        // Listen to lockdown VPN reset.
        intentFilter = new IntentFilter();
        intentFilter.addAction(LockdownVpnTracker.ACTION_LOCKDOWN_RESET);
        mUserAllContext.registerReceiver(
        userAllContext.registerReceiver(
                mIntentReceiver, intentFilter, NETWORK_STACK, mHandler);

        try {
@@ -2322,7 +2320,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
                intent.addFlags(Intent.FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS);
            }
            try {
                mUserAllContext.sendStickyBroadcast(intent, options);
                mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL, options);
            } finally {
                Binder.restoreCallingIdentity(ident);
            }