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

Commit 45381e34 authored by Justin Yun's avatar Justin Yun
Browse files

pm: skip scan-as-privileged for OMR1 vendors

Skip scan-as-privileged for OMR1 vendors because OMR1 could not
define privileged apps in vendor partition.

Bug: 78105955
Bug: 78134108
Test: Flash P-GSI on OMR1 device and check boot
Change-Id: I968e779ea66587563907589ad22d1191a89fe463
parent 0545eaef
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -9974,8 +9974,12 @@ public class PackageManagerService extends IPackageManager.Stub
        }
        // Scan as privileged apps that share a user with a priv-app.
        if (((scanFlags & SCAN_AS_PRIVILEGED) == 0) && !pkg.isPrivileged()
                && (pkg.mSharedUserId != null)) {
        final boolean skipVendorPrivilegeScan = ((scanFlags & SCAN_AS_VENDOR) != 0)
                && SystemProperties.getInt("ro.vndk.version", 28) < 28;
        if (((scanFlags & SCAN_AS_PRIVILEGED) == 0)
                && !pkg.isPrivileged()
                && (pkg.mSharedUserId != null)
                && !skipVendorPrivilegeScan) {
            SharedUserSetting sharedUserSetting = null;
            try {
                sharedUserSetting = mSettings.getSharedUserLPw(pkg.mSharedUserId, 0, 0, false);