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

Commit 00acc09c authored by Jackal Guo's avatar Jackal Guo Committed by Android (Google) Code Review
Browse files

Merge "Honor app visibility for broadcasting PACKAGE_RESTARTED"

parents 11687bf1 24471425
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -4270,12 +4270,19 @@ public class ActivityManagerService extends IActivityManager.Stub
            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY
                    | Intent.FLAG_RECEIVER_FOREGROUND);
        }
        final int userId = UserHandle.getUserId(uid);
        final int[] broadcastAllowList =
                getPackageManagerInternal().getVisibilityAllowList(packageName, userId);
        intent.putExtra(Intent.EXTRA_UID, uid);
        intent.putExtra(Intent.EXTRA_USER_HANDLE, UserHandle.getUserId(uid));
        broadcastIntentLocked(null, null, null, intent,
                null, null, 0, null, null, null, null, OP_NONE,
                null, false, false, MY_PID, SYSTEM_UID, Binder.getCallingUid(),
                Binder.getCallingPid(), UserHandle.getUserId(uid));
        intent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
        broadcastIntentLocked(null /* callerApp */, null /* callerPackage */,
                null /* callerFeatureId */, intent, null /* resolvedType */, null /* resultTo */,
                0 /* resultCode */, null /* resultData */, null /* resultExtras */,
                null /* requiredPermissions */, null /* excludedPermissions */, OP_NONE,
                null /* bOptions */, false /* ordered */, false /* sticky */, MY_PID, SYSTEM_UID,
                Binder.getCallingUid(), Binder.getCallingPid(), userId,
                false /* allowBackgroundActivityStarts */, null /* backgroundActivityStartsToken */,
                broadcastAllowList);
    }
    private void cleanupDisabledPackageComponentsLocked(