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

Commit 18411a42 authored by Jiyong Park's avatar Jiyong Park
Browse files

Ensure TARGET_FLATTEN_APEX == true when ro.apex.updatable is not set

TARGET_FLATTEN_APEX and ro.apex.updatable cannot be independently set.
For a device where updating APEXes is not supported, ro.apex.updatable
should not be set (or set to false) and TARGET_FLATTEN_APEX should be
set to true. For APEX-supporting devices, it is the opposite;
ro.apex.updatable == true and TARGET_FLATTEN_APEX is false (or not set).

To ensure this relationship, TARGET_FLATTEN_APEX is by default set to
true, and overridden to false when updatable_apex.mk is inherited.

Bug: 130623080
Test: choosecombo to Pixels 2 and later; get_build_var
TARGET_FLATTEN_APEX returns false.
choosecombo to the original Pixel and other non-Pixel targets;
get_build_var TARGET_FLATTEN_APEX returns true.
choosecombo to the cuttlefish; get_build_var TARGET_FLATTEN_APEX
returns false

Change-Id: Id73a594dd9838457e68e2793122592c11a84fc83
parent 7f608372
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -498,6 +498,14 @@ else
  TARGET_VENDOR_TEST_SUFFIX :=
endif

###########################################
# APEXes are by default flattened, i.e. non-updatable.
# It can be unflattened (and updatable) by inheriting from
# updatable_apex.mk
ifeq (,$(TARGET_FLATTEN_APEX))
TARGET_FLATTEN_APEX := true
endif

ifeq (,$(TARGET_BUILD_APPS))
ifdef PRODUCT_EXTRA_VNDK_VERSIONS
  $(foreach v,$(PRODUCT_EXTRA_VNDK_VERSIONS),$(call check_vndk_version,$(v)))
+1 −0
Original line number Diff line number Diff line
@@ -18,3 +18,4 @@

PRODUCT_PROPERTY_OVERRIDES := ro.apex.updatable=true
PRODUCT_PACKAGES := com.android.apex.cts.shim.v1_prebuilt
TARGET_FLATTEN_APEX := false