Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11393,6 +11393,7 @@ package android.content.pm { field public static final int INSTALL_FAILED_PACKAGE_CHANGED = -23; // 0xffffffe9 field public static final int INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE = -26; // 0xffffffe6 field public static final int INSTALL_FAILED_REPLACE_COULDNT_DELETE = -10; // 0xfffffff6 field public static final int INSTALL_FAILED_SANDBOX_VERSION_DOWNGRADE = -27; // 0xffffffe5 field public static final int INSTALL_FAILED_SHARED_USER_INCOMPATIBLE = -8; // 0xfffffff8 field public static final int INSTALL_FAILED_TEST_ONLY = -15; // 0xfffffff1 field public static final int INSTALL_FAILED_UPDATE_INCOMPATIBLE = -7; // 0xfffffff9 core/java/android/content/pm/PackageManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -1068,6 +1068,16 @@ public abstract class PackageManager { @SystemApi public static final int INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE = -26; /** * Installation return code: this is passed to the * {@link IPackageInstallObserver} if the new package attempts to downgrade the * target sandbox version of the app. * * @hide */ @SystemApi public static final int INSTALL_FAILED_SANDBOX_VERSION_DOWNGRADE = -27; /** * Installation parse return code: this is passed to the * {@link IPackageInstallObserver} if the parser was given a path that is Loading services/core/java/com/android/server/pm/PackageManagerService.java +10 −0 Original line number Diff line number Diff line Loading @@ -16692,6 +16692,16 @@ public class PackageManagerService extends IPackageManager.Stub { + " target SDK " + oldTargetSdk + " does."); return; } // Prevent apps from downgrading their targetSandbox. final int oldTargetSandbox = oldPackage.applicationInfo.targetSandboxVersion; final int newTargetSandbox = pkg.applicationInfo.targetSandboxVersion; if (oldTargetSandbox == 2 && newTargetSandbox != 2) { res.setError(PackageManager.INSTALL_FAILED_SANDBOX_VERSION_DOWNGRADE, "Package " + pkg.packageName + " new target sandbox " + newTargetSandbox + " is incompatible with the previous value of" + oldTargetSandbox + "."); return; } // Prevent installing of child packages if (oldPackage.parentPackage != null) { Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11393,6 +11393,7 @@ package android.content.pm { field public static final int INSTALL_FAILED_PACKAGE_CHANGED = -23; // 0xffffffe9 field public static final int INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE = -26; // 0xffffffe6 field public static final int INSTALL_FAILED_REPLACE_COULDNT_DELETE = -10; // 0xfffffff6 field public static final int INSTALL_FAILED_SANDBOX_VERSION_DOWNGRADE = -27; // 0xffffffe5 field public static final int INSTALL_FAILED_SHARED_USER_INCOMPATIBLE = -8; // 0xfffffff8 field public static final int INSTALL_FAILED_TEST_ONLY = -15; // 0xfffffff1 field public static final int INSTALL_FAILED_UPDATE_INCOMPATIBLE = -7; // 0xfffffff9
core/java/android/content/pm/PackageManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -1068,6 +1068,16 @@ public abstract class PackageManager { @SystemApi public static final int INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE = -26; /** * Installation return code: this is passed to the * {@link IPackageInstallObserver} if the new package attempts to downgrade the * target sandbox version of the app. * * @hide */ @SystemApi public static final int INSTALL_FAILED_SANDBOX_VERSION_DOWNGRADE = -27; /** * Installation parse return code: this is passed to the * {@link IPackageInstallObserver} if the parser was given a path that is Loading
services/core/java/com/android/server/pm/PackageManagerService.java +10 −0 Original line number Diff line number Diff line Loading @@ -16692,6 +16692,16 @@ public class PackageManagerService extends IPackageManager.Stub { + " target SDK " + oldTargetSdk + " does."); return; } // Prevent apps from downgrading their targetSandbox. final int oldTargetSandbox = oldPackage.applicationInfo.targetSandboxVersion; final int newTargetSandbox = pkg.applicationInfo.targetSandboxVersion; if (oldTargetSandbox == 2 && newTargetSandbox != 2) { res.setError(PackageManager.INSTALL_FAILED_SANDBOX_VERSION_DOWNGRADE, "Package " + pkg.packageName + " new target sandbox " + newTargetSandbox + " is incompatible with the previous value of" + oldTargetSandbox + "."); return; } // Prevent installing of child packages if (oldPackage.parentPackage != null) {