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

Commit e1843e8a authored by Winson Chiu's avatar Winson Chiu
Browse files

Revert "Ignores protected broadcasts if not priv-app"

Revert of I5bd2bf3bd7c38fd9cc563a02b24bc569495d79ed

For now, allow all system apps to declare protected
broadcasts. This will be cleaned up in a future change.

Bug: 158570769

Merged-In: I54d236c0a6daaa934bd64a3bd05e2654e0e868fe
Change-Id: I54d236c0a6daaa934bd64a3bd05e2654e0e868fe
parent f0a0963d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -11615,6 +11615,8 @@ public class PackageManagerService extends IPackageManager.Stub
                    ~ApplicationInfo.PRIVATE_FLAG_DEFAULT_TO_DEVICE_PROTECTED_STORAGE;
            pkg.applicationInfo.privateFlags &=
                    ~ApplicationInfo.PRIVATE_FLAG_DIRECT_BOOT_AWARE;
            // clear protected broadcasts
            pkg.protectedBroadcasts = null;
            // cap permission priorities
            if (pkg.permissionGroups != null && pkg.permissionGroups.size() > 0) {
                for (int i = pkg.permissionGroups.size() - 1; i >= 0; --i) {
@@ -11623,8 +11625,6 @@ public class PackageManagerService extends IPackageManager.Stub
            }
        }
        if ((scanFlags & SCAN_AS_PRIVILEGED) == 0) {
            // clear protected broadcasts
            pkg.protectedBroadcasts = null;
            // ignore export request for single user receivers
            if (pkg.receivers != null) {
                for (int i = pkg.receivers.size() - 1; i >= 0; --i) {