Split vendor's system prop overrides into vendor partition

If ENABLE_TREBLE and early mount of vendor partition are enabled,
overrides in PRODUCT_DEFAULT_PROPERTY_OVERRIDES will be stored in
vendor/default.prop.

If ENABLE_TREBLE and vendor partition are enabled, overrides in
PRODUCT_PROPERTY_OVERRIDES will be stored in vendor/build.prop.

default.prop of recovery image will include all the contents of
vendor/default.prop and vendor/build.prop additionally.

ENABLE_EARLY_MOUNT is added to specify whether early mount is enabled
or not, but it should be removed later when early mount becomes
default for all ENABLE_TREBLE products.

Test: building succeeded, and verified on bullhead.
Bug: 34116668
Change-Id: Ic2eb8882ae71921a76c02b3d62d3289c45949295
diff --git a/tools/post_process_props.py b/tools/post_process_props.py
index 9dcaadf..80fb85d 100755
--- a/tools/post_process_props.py
+++ b/tools/post_process_props.py
@@ -30,6 +30,12 @@
 def mangle_build_prop(prop):
   pass
 
+# Put the modifications that you need to make into /vendor/default.prop and
+# /odm/default.prop into this function. The prop object has get(name) and
+# put(name,value) methods.
+def mangle_default_prop_override(prop):
+  pass
+
 # Put the modifications that you need to make into the /default.prop into this
 # function. The prop object has get(name) and put(name,value) methods.
 def mangle_default_prop(prop):
@@ -119,6 +125,9 @@
 
   if filename.endswith("/build.prop"):
     mangle_build_prop(properties)
+  elif (filename.endswith("/vendor/default.prop") or
+        filename.endswith("/odm/default.prop")):
+    mangle_default_prop_override(properties)
   elif filename.endswith("/default.prop"):
     mangle_default_prop(properties)
   else: