Use flag for min supported target sdk

Test: Build and flash
Test: adb shell getprop ro.build.version.min_supported_target_sdk
Bug: 297603927
Change-Id: I3a2bcad6b001364a2cf35cad1cac7f69185169d0
This commit is contained in:
Linus Tufvesson 2024-04-12 12:18:06 +02:00
parent f2b6a44b06
commit 984b069ce2
2 changed files with 3 additions and 7 deletions

View file

@ -52,8 +52,6 @@ $(call add_json_str, Platform_version_known_codenames, $(PLATFORM_VERSION_KNOW
$(call add_json_bool, Release_aidl_use_unfrozen, $(RELEASE_AIDL_USE_UNFROZEN))
$(call add_json_str, Platform_min_supported_target_sdk_version, $(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION))
$(call add_json_bool, Allow_missing_dependencies, $(filter true,$(ALLOW_MISSING_DEPENDENCIES)))
$(call add_json_bool, Unbundled_build, $(TARGET_BUILD_UNBUNDLED))
$(call add_json_list, Unbundled_build_apps, $(TARGET_BUILD_APPS))

View file

@ -221,10 +221,8 @@ ifndef HAS_BUILD_NUMBER
endif
.KATI_READONLY := HAS_BUILD_NUMBER
ifndef PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION
# Used to set minimum supported target sdk version. Apps targeting sdk
# version lower than the set value will result in a warning being shown
# when any activity from the app is started.
PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 28
ifdef PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION
$(error Do not set PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION directly. Use RELEASE_PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION. value: $(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION))
endif
PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := $(RELEASE_PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION)
.KATI_READONLY := PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION