Use BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED for system props split

System props split should be controlled regardless of kernel config
because generic AOSP system image should not include any overrides
but it will be built without kernal.

Additionally we don't have any usecase only to split system build
properties, so we don't need to have two different flags for default
and build properties.

Test: building succeeded and tested with sailfish
Bug: 34116668
Change-Id: I24e909c533da509583a7e8be01f329f52d3820fc
diff --git a/core/Makefile b/core/Makefile
index 3132fc7..9c2bd78 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -71,21 +71,10 @@
 endif
 
 # -----------------------------------------------------------------
-# vendor_default_property_overrides_split_enabled and
-# vendor_build_property_overrides_split_enabled
-vendor_default_property_overrides_split_enabled :=
-vendor_build_property_overrides_split_enabled :=
-ifeq ($(ENABLE_TREBLE), true)
-  ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE
-    vendor_build_property_overrides_split_enabled := true
-
-    # Checks whether early mount for vendor partition is enabled or not.
-    # TODO(jaekyun): Early mount will be mandatory for ENABLE_TREBLE=true. After
-    # that is done, this condition check should be removed.
-    ifeq ($(ENABLE_EARLY_MOUNT), true)
-      vendor_default_property_overrides_split_enabled := true
-    endif
-  endif
+# property_overrides_split_enabled
+property_overrides_split_enabled :=
+ifeq ($(BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED), true)
+  property_overrides_split_enabled := true
 endif
 
 # -----------------------------------------------------------------
@@ -94,7 +83,7 @@
 ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_DEFAULT_PROP_TARGET)
 FINAL_DEFAULT_PROPERTIES := \
     $(call collapse-pairs, $(ADDITIONAL_DEFAULT_PROPERTIES))
-ifndef vendor_default_property_overrides_split_enabled
+ifndef property_overrides_split_enabled
   FINAL_DEFAULT_PROPERTIES += \
       $(call collapse-pairs, $(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))
 endif
@@ -122,7 +111,7 @@
 # -----------------------------------------------------------------
 # vendor default.prop
 INSTALLED_VENDOR_DEFAULT_PROP_TARGET :=
-ifdef vendor_default_property_overrides_split_enabled
+ifdef property_overrides_split_enabled
 INSTALLED_VENDOR_DEFAULT_PROP_TARGET := $(TARGET_OUT_VENDOR)/default.prop
 ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_VENDOR_DEFAULT_PROP_TARGET)
 
@@ -141,7 +130,7 @@
 		echo "$(line)" >> $@;)
 	$(hide) build/tools/post_process_props.py $@
 
-endif  # vendor_default_property_overrides_split_enabled
+endif  # property_overrides_split_enabled
 
 # -----------------------------------------------------------------
 # build.prop
@@ -291,7 +280,7 @@
 			TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \
 			TARGET_AAPT_CHARACTERISTICS="$(TARGET_AAPT_CHARACTERISTICS)" \
 	        bash $(BUILDINFO_SH) >> $@
-ifndef vendor_build_property_overrides_split_enabled
+ifndef property_overrides_split_enabled
 	$(hide) TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \
 			TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
 	        bash $(VENDOR_BUILDINFO_SH) >> $@
@@ -337,12 +326,12 @@
 INSTALLED_VENDOR_BUILD_PROP_TARGET := $(TARGET_OUT_VENDOR)/build.prop
 ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_VENDOR_BUILD_PROP_TARGET)
 
-ifdef vendor_build_property_overrides_split_enabled
+ifdef property_overrides_split_enabled
 FINAL_VENDOR_BUILD_PROPERTIES += \
     $(call collapse-pairs, $(PRODUCT_PROPERTY_OVERRIDES))
 FINAL_VENDOR_BUILD_PROPERTIES := $(call uniq-pairs-by-first-component, \
     $(FINAL_VENDOR_BUILD_PROPERTIES),=)
-endif  # vendor_build_property_overrides_split_enabled
+endif  # property_overrides_split_enabled
 
 $(INSTALLED_VENDOR_BUILD_PROP_TARGET): $(VENDOR_BUILDINFO_SH)
 	@echo Target vendor buildinfo: $@
@@ -351,7 +340,7 @@
 	$(hide) echo ro.vendor.build.date=`$(DATE_FROM_FILE)`>>$@
 	$(hide) echo ro.vendor.build.date.utc=`$(DATE_FROM_FILE) +%s`>>$@
 	$(hide) echo ro.vendor.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@
-ifdef vendor_build_property_overrides_split_enabled
+ifdef property_overrides_split_enabled
 	$(hide) TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \
 			TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
 	        bash $(VENDOR_BUILDINFO_SH) >> $@
@@ -361,7 +350,7 @@
 	$(hide) $(foreach line,$(FINAL_VENDOR_BUILD_PROPERTIES), \
 		echo "$(line)" >> $@;)
 	$(hide) build/tools/post_process_props.py $@
-endif  # vendor_build_property_overrides_split_enabled
+endif  # property_overrides_split_enabled
 endif  # BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE
 
 # ----------------------------------------------------------------
@@ -981,7 +970,7 @@
 recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system
 recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img
 recovery_build_props := $(intermediate_system_build_prop)
-ifdef vendor_build_property_overrides_split_enabled
+ifdef property_overrides_split_enabled
 recovery_build_props += $(INSTALLED_VENDOR_BUILD_PROP_TARGET)
 endif
 recovery_resources_common := $(call include-path-for, recovery)/res