Loading core/java/android/content/pm/PackageManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -1561,6 +1561,14 @@ public abstract class PackageManager { */ public static final int INSTALL_PARSE_FAILED_RESOURCES_ARSC_COMPRESSED = -124; /** * Installation failed return code: the package was skipped and should be ignored. * * The reason for the skip is undefined. * @hide */ public static final int INSTALL_PARSE_FAILED_SKIPPED = -125; /** @hide */ @IntDef(flag = true, prefix = { "DELETE_" }, value = { DELETE_KEEP_DATA, Loading core/java/android/content/pm/PackageParser.java +1 −0 Original line number Diff line number Diff line Loading @@ -2001,6 +2001,7 @@ public class PackageParser { Slog.i(TAG, "Skipping target and overlay pair " + pkg.mOverlayTarget + " and " + pkg.baseCodePath+ ": overlay ignored due to required system property: " + propName + " with value: " + propValue); mParseError = PackageManager.INSTALL_PARSE_FAILED_SKIPPED; return null; } Loading core/java/android/content/pm/parsing/ParsingPackageUtils.java +4 −6 Original line number Diff line number Diff line Loading @@ -2347,14 +2347,12 @@ public class ParsingPackageUtils { String propValue = sa.getString( R.styleable.AndroidManifestResourceOverlay_requiredSystemPropertyValue); if (!PackageParser.checkRequiredSystemProperties(propName, propValue)) { Slog.i(TAG, "Skipping target and overlay pair " + target + " and " String message = "Skipping target and overlay pair " + target + " and " + pkg.getBaseCodePath() + ": overlay ignored due to required system property: " + propName + " with value: " + propValue); return input.error("Skipping target and overlay pair " + target + " and " + pkg.getBaseCodePath() + ": overlay ignored due to required system property: " + propName + " with value: " + propValue); + propName + " with value: " + propValue; Slog.i(TAG, message); return input.skip(message); } return input.success(pkg.setOverlay(true) Loading core/java/android/content/pm/parsing/result/ParseInput.java +8 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,14 @@ public interface ParseInput { */ ParseResult<?> enableDeferredError(String packageName, int targetSdkVersion); /** * This will assign errorCode to {@link PackageManager#INSTALL_PARSE_FAILED_SKIPPED, used for * packages which should be ignored by the caller. * * @see #error(int, String, Exception) */ <ResultType> ParseResult<ResultType> skip(@NonNull String parseError); /** @see #error(int, String, Exception) */ <ResultType> ParseResult<ResultType> error(int parseError); Loading core/java/android/content/pm/parsing/result/ParseTypeImpl.java +5 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,11 @@ public class ParseTypeImpl implements ParseInput, ParseResult<Object> { return success(null); } @Override public <ResultType> ParseResult<ResultType> skip(@NonNull String parseError) { return error(PackageManager.INSTALL_PARSE_FAILED_SKIPPED, parseError); } @Override public <ResultType> ParseResult<ResultType> error(int parseError) { return error(parseError, null); Loading Loading
core/java/android/content/pm/PackageManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -1561,6 +1561,14 @@ public abstract class PackageManager { */ public static final int INSTALL_PARSE_FAILED_RESOURCES_ARSC_COMPRESSED = -124; /** * Installation failed return code: the package was skipped and should be ignored. * * The reason for the skip is undefined. * @hide */ public static final int INSTALL_PARSE_FAILED_SKIPPED = -125; /** @hide */ @IntDef(flag = true, prefix = { "DELETE_" }, value = { DELETE_KEEP_DATA, Loading
core/java/android/content/pm/PackageParser.java +1 −0 Original line number Diff line number Diff line Loading @@ -2001,6 +2001,7 @@ public class PackageParser { Slog.i(TAG, "Skipping target and overlay pair " + pkg.mOverlayTarget + " and " + pkg.baseCodePath+ ": overlay ignored due to required system property: " + propName + " with value: " + propValue); mParseError = PackageManager.INSTALL_PARSE_FAILED_SKIPPED; return null; } Loading
core/java/android/content/pm/parsing/ParsingPackageUtils.java +4 −6 Original line number Diff line number Diff line Loading @@ -2347,14 +2347,12 @@ public class ParsingPackageUtils { String propValue = sa.getString( R.styleable.AndroidManifestResourceOverlay_requiredSystemPropertyValue); if (!PackageParser.checkRequiredSystemProperties(propName, propValue)) { Slog.i(TAG, "Skipping target and overlay pair " + target + " and " String message = "Skipping target and overlay pair " + target + " and " + pkg.getBaseCodePath() + ": overlay ignored due to required system property: " + propName + " with value: " + propValue); return input.error("Skipping target and overlay pair " + target + " and " + pkg.getBaseCodePath() + ": overlay ignored due to required system property: " + propName + " with value: " + propValue); + propName + " with value: " + propValue; Slog.i(TAG, message); return input.skip(message); } return input.success(pkg.setOverlay(true) Loading
core/java/android/content/pm/parsing/result/ParseInput.java +8 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,14 @@ public interface ParseInput { */ ParseResult<?> enableDeferredError(String packageName, int targetSdkVersion); /** * This will assign errorCode to {@link PackageManager#INSTALL_PARSE_FAILED_SKIPPED, used for * packages which should be ignored by the caller. * * @see #error(int, String, Exception) */ <ResultType> ParseResult<ResultType> skip(@NonNull String parseError); /** @see #error(int, String, Exception) */ <ResultType> ParseResult<ResultType> error(int parseError); Loading
core/java/android/content/pm/parsing/result/ParseTypeImpl.java +5 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,11 @@ public class ParseTypeImpl implements ParseInput, ParseResult<Object> { return success(null); } @Override public <ResultType> ParseResult<ResultType> skip(@NonNull String parseError) { return error(PackageManager.INSTALL_PARSE_FAILED_SKIPPED, parseError); } @Override public <ResultType> ParseResult<ResultType> error(int parseError) { return error(parseError, null); Loading