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

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

Merge "Fix up PackageSetting pkg and path documentation"

parents c482cd70 b92073c5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -184,11 +184,11 @@ class PackageParsingPerfTest {

                override fun startParsingPackage(
                    packageName: String,
                    baseCodePath: String,
                    codePath: String,
                    baseApkPath: String,
                    path: String,
                    manifestArray: TypedArray,
                    isCoreApp: Boolean
                ) = ParsingPackageImpl(packageName, baseCodePath, codePath, manifestArray)
                ) = ParsingPackageImpl(packageName, baseApkPath, path, manifestArray)
            })

        override fun parseImpl(file: File) =
+2 −2
Original line number Diff line number Diff line
@@ -579,8 +579,8 @@ public class PackageInfoWithoutStateUtils {
        ii.handleProfiling = i.isHandleProfiling();
        ii.functionalTest = i.isFunctionalTest();

        ii.sourceDir = pkg.getBaseCodePath();
        ii.publicSourceDir = pkg.getBaseCodePath();
        ii.sourceDir = pkg.getBaseApkPath();
        ii.publicSourceDir = pkg.getBaseApkPath();
        ii.splitNames = pkg.getSplitNames();
        ii.splitSourceDirs = pkg.getSplitCodePaths();
        ii.splitPublicSourceDirs = pkg.getSplitCodePaths();
+18 −18
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
    private String realPackage;

    @NonNull
    protected String baseCodePath;
    protected String mBaseApkPath;

    private boolean requiredForAllUsers;
    @Nullable
@@ -280,7 +280,7 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {

    @NonNull
    @DataClass.ParcelWith(ForInternedString.class)
    protected String codePath;
    protected String mPath;

    private boolean use32BitAbi;
    private boolean visibleToInstantApps;
@@ -429,11 +429,11 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
    private ArraySet<String> mimeGroups;

    @VisibleForTesting
    public ParsingPackageImpl(@NonNull String packageName, @NonNull String baseCodePath,
            @NonNull String codePath, @Nullable TypedArray manifestArray) {
    public ParsingPackageImpl(@NonNull String packageName, @NonNull String baseApkPath,
            @NonNull String path, @Nullable TypedArray manifestArray) {
        this.packageName = TextUtils.safeIntern(packageName);
        this.baseCodePath = baseCodePath;
        this.codePath = codePath;
        this.mBaseApkPath = baseApkPath;
        this.mPath = path;

        if (manifestArray != null) {
            versionCode = manifestArray.getInteger(R.styleable.AndroidManifest_versionCode, 0);
@@ -961,10 +961,10 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
        appInfo.volumeUuid = volumeUuid;
        appInfo.zygotePreloadName = zygotePreloadName;
        appInfo.setGwpAsanMode(gwpAsanMode);
        appInfo.setBaseCodePath(baseCodePath);
        appInfo.setBaseResourcePath(baseCodePath);
        appInfo.setCodePath(codePath);
        appInfo.setResourcePath(codePath);
        appInfo.setBaseCodePath(mBaseApkPath);
        appInfo.setBaseResourcePath(mBaseApkPath);
        appInfo.setCodePath(mPath);
        appInfo.setResourcePath(mPath);
        appInfo.setSplitCodePaths(splitCodePaths);
        appInfo.setSplitResourcePaths(splitCodePaths);
        appInfo.setVersionCode(PackageInfo.composeLongVersionCode(versionCodeMajor, versionCode));
@@ -993,7 +993,7 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
        dest.writeString(this.compileSdkVersionCodeName);
        sForInternedString.parcel(this.packageName, dest, flags);
        dest.writeString(this.realPackage);
        dest.writeString(this.baseCodePath);
        dest.writeString(this.mBaseApkPath);
        dest.writeBoolean(this.requiredForAllUsers);
        dest.writeString(this.restrictedAccountType);
        dest.writeString(this.requiredAccountType);
@@ -1048,7 +1048,7 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
        dest.writeBundle(this.metaData);
        sForInternedString.parcel(this.volumeUuid, dest, flags);
        dest.writeParcelable(this.signingDetails, flags);
        dest.writeString(this.codePath);
        dest.writeString(this.mPath);
        dest.writeBoolean(this.use32BitAbi);
        dest.writeBoolean(this.visibleToInstantApps);
        dest.writeBoolean(this.forceQueryable);
@@ -1157,7 +1157,7 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
        this.compileSdkVersionCodeName = in.readString();
        this.packageName = sForInternedString.unparcel(in);
        this.realPackage = in.readString();
        this.baseCodePath = in.readString();
        this.mBaseApkPath = in.readString();
        this.requiredForAllUsers = in.readBoolean();
        this.restrictedAccountType = in.readString();
        this.requiredAccountType = in.readString();
@@ -1212,7 +1212,7 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
        this.metaData = in.readBundle(boot);
        this.volumeUuid = sForInternedString.unparcel(in);
        this.signingDetails = in.readParcelable(boot);
        this.codePath = in.readString();
        this.mPath = in.readString();
        this.use32BitAbi = in.readBoolean();
        this.visibleToInstantApps = in.readBoolean();
        this.forceQueryable = in.readBoolean();
@@ -1361,8 +1361,8 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {

    @NonNull
    @Override
    public String getBaseCodePath() {
        return baseCodePath;
    public String getBaseApkPath() {
        return mBaseApkPath;
    }

    @Override
@@ -1647,8 +1647,8 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {

    @NonNull
    @Override
    public String getCodePath() {
        return codePath;
    public String getPath() {
        return mPath;
    }

    @Override
+2 −2
Original line number Diff line number Diff line
@@ -548,7 +548,7 @@ public interface ParsingPackageRead extends Parcelable {
    String getPackageName();

    /** Path of base APK */
    String getBaseCodePath();
    String getBaseApkPath();

    /**
     * Path where this package was found on disk. For monolithic packages
@@ -556,7 +556,7 @@ public interface ParsingPackageRead extends Parcelable {
     * path to the cluster directory.
     */
    @NonNull
    String getCodePath();
    String getPath();

    /**
     * @see ApplicationInfo#compatibleWidthLimitDp
+10 −10
Original line number Diff line number Diff line
@@ -162,10 +162,10 @@ public class ParsingPackageUtils {
            @Override
            public ParsingPackage startParsingPackage(
                    @NonNull String packageName,
                    @NonNull String baseCodePath,
                    @NonNull String codePath,
                    @NonNull String baseApkPath,
                    @NonNull String path,
                    @NonNull TypedArray manifestArray, boolean isCoreApp) {
                return new ParsingPackageImpl(packageName, baseCodePath, codePath, manifestArray);
                return new ParsingPackageImpl(packageName, baseApkPath, path, manifestArray);
            }
        });
        try {
@@ -1213,9 +1213,9 @@ public class ParsingPackageUtils {
                features = ArrayUtils.add(features, featureInfo);
            } else {
                Slog.w(TAG,
                        "Unknown element under <feature-group>: " + innerTagName +
                                " at " + pkg.getBaseCodePath() + " " +
                                parser.getPositionDescription());
                        "Unknown element under <feature-group>: " + innerTagName
                                + " at " + pkg.getBaseApkPath() + " "
                                + parser.getPositionDescription());
            }
        }

@@ -2419,7 +2419,7 @@ public class ParsingPackageUtils {
                    R.styleable.AndroidManifestResourceOverlay_requiredSystemPropertyValue);
            if (!PackageParser.checkRequiredSystemProperties(propName, propValue)) {
                String message = "Skipping target and overlay pair " + target + " and "
                        + pkg.getBaseCodePath()
                        + pkg.getBaseApkPath()
                        + ": overlay ignored due to required system property: "
                        + propName + " with value: " + propValue;
                Slog.i(TAG, message);
@@ -2674,7 +2674,7 @@ public class ParsingPackageUtils {
                                    "<meta-data> only supports string, integer, float, color, "
                                            + "boolean, and resource reference types: "
                                            + parser.getName() + " at "
                                            + pkg.getBaseCodePath() + " "
                                            + pkg.getBaseApkPath() + " "
                                            + parser.getPositionDescription());
                        } else {
                            return input.error("<meta-data> only supports string, integer, float, "
@@ -2711,7 +2711,7 @@ public class ParsingPackageUtils {
        try {
            ParseResult<SigningDetails> result = getSigningDetails(
                    input,
                    pkg.getBaseCodePath(),
                    pkg.getBaseApkPath(),
                    skipVerify,
                    pkg.isStaticSharedLibrary(),
                    signingDetails,
@@ -2857,7 +2857,7 @@ public class ParsingPackageUtils {
        boolean hasFeature(String feature);

        ParsingPackage startParsingPackage(@NonNull String packageName,
                @NonNull String baseCodePath, @NonNull String codePath,
                @NonNull String baseApkPath, @NonNull String path,
                @NonNull TypedArray manifestArray, boolean isCoreApp);
    }
}
Loading