Allow space in BOARD_*_SIZE variables for dynamic partitions

Allow instances like:
BOARD_SUPER_PARTITION_SIZE := 4294967296 # 4GiB

Test: add trailing space to BOARD_SUPER_PARTITION_SIZE,
BOARD_(group)_SIZE, BOARD_*IMAGE_PARTITION_RESERVED_SIZE,
BOARD_SUPER_PARTITION_(device)_DEVICE_SIZE, build passes.

Fixes: 120042457
Change-Id: Ib7244e3fd2f782657c84cdb74e601ac96176571d
diff --git a/core/product.mk b/core/product.mk
index fbdd237..8497b28 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -404,7 +404,7 @@
 	WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
 
 # Logical partitions related variables.
-_product_stash_var_list += \
+_dynamic_partitions_var_list += \
 	BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE \
 	BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE \
 	BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE \
@@ -413,6 +413,9 @@
 	BOARD_SUPER_PARTITION_SIZE \
 	BOARD_SUPER_PARTITION_GROUPS \
 
+_product_stash_var_list += $(_dynamic_partitions_var_list)
+_product_strip_var_list := $(_dynamic_partitions_var_list)
+
 #
 # Mark the variables in _product_stash_var_list as readonly
 #
@@ -423,6 +426,13 @@
  )
 endef
 
+#
+# Strip the variables in _product_strip_var_list
+#
+define strip-product-vars
+$(foreach v,$(_product_strip_var_list),$(eval $(v) := $(strip $($(v)))))
+endef
+
 define add-to-product-copy-files-if-exists
 $(if $(wildcard $(word 1,$(subst :, ,$(1)))),$(1))
 endef