Don't log privapp-permissions violations for updated apps
Only warn about violations in non-updated apps. If an updated privileged app started requesting a new privileged permission, it cannot be whitelisted on system image, so we should revoke it as before, but not log. Test: manual Bug: 35633526 Change-Id: I6aacaed4be7bf6eaef08ea81ea49cd250c81e71e
This commit is contained in:
@@ -11662,7 +11662,8 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
if (!whitelisted) {
|
||||
Slog.w(TAG, "Privileged permission " + perm + " for package "
|
||||
+ pkg.packageName + " - not in privapp-permissions whitelist");
|
||||
if (!mSystemReady) {
|
||||
// Only report violations for apps on system image
|
||||
if (!mSystemReady && !pkg.isUpdatedSystemApp()) {
|
||||
if (mPrivappPermissionsViolations == null) {
|
||||
mPrivappPermissionsViolations = new ArraySet<>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user