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

Change-Id: I54d236c0a6daaa934bd64a3bd05e2654e0e868fe
This commit is contained in:
Winson
2020-06-16 15:12:57 -07:00
parent 26dfdc587f
commit 3e46d7e1a1

View File

@@ -11729,6 +11729,8 @@ public class PackageManagerService extends IPackageManager.Stub
} }
} else { } else {
parsedPackage parsedPackage
// Non system apps cannot mark any broadcast as protected
.clearProtectedBroadcasts()
// non system apps can't be flagged as core // non system apps can't be flagged as core
.setCoreApp(false) .setCoreApp(false)
// clear flags not applicable to regular apps // clear flags not applicable to regular apps
@@ -11740,7 +11742,6 @@ public class PackageManagerService extends IPackageManager.Stub
} }
if ((scanFlags & SCAN_AS_PRIVILEGED) == 0) { if ((scanFlags & SCAN_AS_PRIVILEGED) == 0) {
parsedPackage parsedPackage
.clearProtectedBroadcasts()
.markNotActivitiesAsNotExportedIfSingleUser(); .markNotActivitiesAsNotExportedIfSingleUser();
} }