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

Commit 0ba0d814 authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

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
parent 5faf3039
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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<>();
                    }