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

Commit 70934231 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Remove isV2App" am: 992356cc am: 0c0ea183" into qt-dev-plus-aosp

parents cfb65eec f46c23bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11240,7 +11240,7 @@ public class PackageManagerService extends IPackageManager.Stub
            sharedUserSetting.isPrivileged() | pkg.isPrivileged() : pkg.isPrivileged();
        pkg.applicationInfo.seInfo = SELinuxMMAC.getSeInfo(pkg, isPrivileged,
                pkg.applicationInfo.targetSandboxVersion, targetSdkVersion);
                targetSdkVersion);
        pkg.applicationInfo.seInfoUser = SELinuxUtil.assignSeinfoUser(pkgSetting.readUserState(
                userId == UserHandle.USER_ALL ? UserHandle.USER_SYSTEM : userId));
+1 −9
Original line number Diff line number Diff line
@@ -69,9 +69,6 @@ public final class SELinuxMMAC {
    // Append privapp to existing seinfo label
    private static final String PRIVILEGED_APP_STR = ":privapp";

    // Append v2 to existing seinfo label
    private static final String SANDBOX_V2_STR = ":v2";

    // Append targetSdkVersion=n to existing seinfo label where n is the app's targetSdkVersion
    private static final String TARGETSDKVERSION_STR = ":targetSdkVersion=";

@@ -323,14 +320,13 @@ public final class SELinuxMMAC {
     *
     * @param pkg object representing the package to be labeled.
     * @param isPrivileged boolean.
     * @param targetSandboxVersion int.
     * @param targetSdkVersion int. If this pkg runs as a sharedUser, targetSdkVersion is the
     *        greater of: lowest targetSdk for all pkgs in the sharedUser, or
     *        MINIMUM_TARGETSDKVERSION.
     * @return String representing the resulting seinfo.
     */
    public static String getSeInfo(PackageParser.Package pkg, boolean isPrivileged,
            int targetSandboxVersion, int targetSdkVersion) {
            int targetSdkVersion) {
        String seInfo = null;
        synchronized (sPolicies) {
            if (!sPolicyRead) {
@@ -351,10 +347,6 @@ public final class SELinuxMMAC {
            seInfo = DEFAULT_SEINFO;
        }

        if (targetSandboxVersion == 2) {
            seInfo += SANDBOX_V2_STR;
        }

        if (isPrivileged) {
            seInfo += PRIVILEGED_APP_STR;
        }
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ public final class SharedUserSetting extends SettingBase {
        for (PackageParser.Package pkg : pkgList) {
            final boolean isPrivileged = isPrivileged() | pkg.isPrivileged();
            pkg.applicationInfo.seInfo = SELinuxMMAC.getSeInfo(pkg, isPrivileged,
                pkg.applicationInfo.targetSandboxVersion, seInfoTargetSdkVersion);
                seInfoTargetSdkVersion);
        }
    }