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

Commit 992356cc authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Remove isV2App"

parents 31c0ceba 5cf1e975
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10722,7 +10722,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
@@ -139,7 +139,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);
        }
    }