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

Commit a0a70da5 authored by Nick Kovacs's avatar Nick Kovacs Committed by Automerger Merge Worker
Browse files

Merge "Revert "Enable low target sdk install block by default"" into udc-dev...

Merge "Revert "Enable low target sdk install block by default"" into udc-dev am: 817ef20b am: 85a4b8cf

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22083902



Change-Id: I3a6a0a2f9732c2b9670f0a2ca28342e60454ea68
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7de707bc 85a4b8cf
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1134,22 +1134,22 @@ final class InstallPackageHelper {
        // behavior.
        if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PACKAGE_MANAGER_SERVICE,
                "MinInstallableTargetSdk__install_block_enabled",
                true)) {
                false)) {
            int minInstallableTargetSdk =
                    DeviceConfig.getInt(DeviceConfig.NAMESPACE_PACKAGE_MANAGER_SERVICE,
                            "MinInstallableTargetSdk__min_installable_target_sdk",
                            PackageManagerService.MIN_INSTALLABLE_TARGET_SDK);
                            0);

            // Determine if enforcement is in strict mode
            boolean strictMode = false;

            if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PACKAGE_MANAGER_SERVICE,
                    "MinInstallableTargetSdk__install_block_strict_mode_enabled",
                    true)) {
                    false)) {
                if (parsedPackage.getTargetSdkVersion()
                        < DeviceConfig.getInt(DeviceConfig.NAMESPACE_PACKAGE_MANAGER_SERVICE,
                        "MinInstallableTargetSdk__strict_mode_target_sdk",
                        PackageManagerService.MIN_INSTALLABLE_TARGET_SDK)) {
                        0)) {
                    strictMode = true;
                }
            }
+0 −8
Original line number Diff line number Diff line
@@ -558,14 +558,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService
    // How many required verifiers can be on the system.
    private static final int REQUIRED_VERIFIERS_MAX_COUNT = 2;

    /**
     * Specifies the minimum target SDK version an apk must specify in order to be installed
     * on the system. This improves security and privacy by blocking low
     * target sdk apps as malware can target older sdk versions to avoid
     * the enforcement of new API behavior.
     */
    public static final int MIN_INSTALLABLE_TARGET_SDK = Build.VERSION_CODES.M;

    // Compilation reasons.
    // TODO(b/260124949): Clean this up with the legacy dexopt code.
    public static final int REASON_FIRST_BOOT = 0;