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

Commit efdc6635 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Define targetSandboxVersion"

parents 5d6facc8 11e45075
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1269,6 +1269,7 @@ package android {
    field public static final int targetId = 16843740; // 0x10103dc
    field public static final int targetName = 16843853; // 0x101044d
    field public static final int targetPackage = 16842785; // 0x1010021
    field public static final int targetSandboxVersion = 16844110; // 0x101054e
    field public static final int targetSdkVersion = 16843376; // 0x1010270
    field public static final int taskAffinity = 16842770; // 0x1010012
    field public static final int taskCloseEnterAnimation = 16842942; // 0x10100be
+1 −0
Original line number Diff line number Diff line
@@ -1385,6 +1385,7 @@ package android {
    field public static final int targetId = 16843740; // 0x10103dc
    field public static final int targetName = 16843853; // 0x101044d
    field public static final int targetPackage = 16842785; // 0x1010021
    field public static final int targetSandboxVersion = 16844110; // 0x101054e
    field public static final int targetSdkVersion = 16843376; // 0x1010270
    field public static final int taskAffinity = 16842770; // 0x1010012
    field public static final int taskCloseEnterAnimation = 16842942; // 0x10100be
+1 −0
Original line number Diff line number Diff line
@@ -1269,6 +1269,7 @@ package android {
    field public static final int targetId = 16843740; // 0x10103dc
    field public static final int targetName = 16843853; // 0x101044d
    field public static final int targetPackage = 16842785; // 0x1010021
    field public static final int targetSandboxVersion = 16844110; // 0x101054e
    field public static final int targetSdkVersion = 16843376; // 0x1010270
    field public static final int taskAffinity = 16842770; // 0x1010012
    field public static final int taskCloseEnterAnimation = 16842942; // 0x10100be
+12 −1
Original line number Diff line number Diff line
@@ -831,6 +831,12 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
     */
    public int networkSecurityConfigRes;

    /**
     * Version of the sandbox the application wants to run in.
     * @hide
     */
    public int targetSandboxVersion;

    /**
     * The category of this app. Categories are used to cluster multiple apps
     * together into meaningful groups, such as when summarizing battery,
@@ -1012,7 +1018,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
        pw.println(prefix + "enabled=" + enabled
                + " minSdkVersion=" + minSdkVersion
                + " targetSdkVersion=" + targetSdkVersion
                + " versionCode=" + versionCode);
                + " versionCode=" + versionCode
                + " targetSandboxVersion=" + targetSandboxVersion);
        if ((flags&DUMP_FLAG_DETAILS) != 0) {
            if (manageSpaceActivityName != null) {
                pw.println(prefix + "manageSpaceActivityName=" + manageSpaceActivityName);
@@ -1127,6 +1134,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
        fullBackupContent = orig.fullBackupContent;
        networkSecurityConfigRes = orig.networkSecurityConfigRes;
        category = orig.category;
        targetSandboxVersion = orig.targetSandboxVersion;
    }

    public String toString() {
@@ -1187,6 +1195,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
        dest.writeInt(fullBackupContent);
        dest.writeInt(networkSecurityConfigRes);
        dest.writeInt(category);
        dest.writeInt(targetSandboxVersion);
    }

    public static final Parcelable.Creator<ApplicationInfo> CREATOR
@@ -1247,6 +1256,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
        fullBackupContent = source.readInt();
        networkSecurityConfigRes = source.readInt();
        category = source.readInt();
        targetSandboxVersion = source.readInt();
    }

    /**
@@ -1315,6 +1325,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
        } else {
            dataDir = credentialProtectedDataDir;
        }
        // TODO: modify per-user ephemerality
    }

    /**
+5 −0
Original line number Diff line number Diff line
@@ -296,6 +296,7 @@ public class PackageParser {
    private static boolean sCompatibilityModeEnabled = true;
    private static final int PARSE_DEFAULT_INSTALL_LOCATION =
            PackageInfo.INSTALL_LOCATION_UNSPECIFIED;
    private static final int PARSE_DEFAULT_TARGET_SANDBOX = 1;

    static class ParsePackageItemArgs {
        final Package owner;
@@ -1996,6 +1997,10 @@ public class PackageParser {
                PARSE_DEFAULT_INSTALL_LOCATION);
        pkg.applicationInfo.installLocation = pkg.installLocation;

        final int targetSandboxVersion = sa.getInteger(
                com.android.internal.R.styleable.AndroidManifest_targetSandboxVersion,
                PARSE_DEFAULT_TARGET_SANDBOX);
        pkg.applicationInfo.targetSandboxVersion = targetSandboxVersion;

        /* Set the global "forward lock" flag */
        if ((flags & PARSE_FORWARD_LOCK) != 0) {
Loading