Refactor conditional to use DEVICE_IS_64BIT_ONLY

Bug: 218458605
Bug: 223622655
Signed-off-by: Gina Ko <yichunko@google.com>
Change-Id: Ia74ef39ab8433d036925a30217f49da8f6fd863b
diff --git a/aosp_common.mk b/aosp_common.mk
index 57d6722..8788251 100644
--- a/aosp_common.mk
+++ b/aosp_common.mk
@@ -17,10 +17,12 @@
 #
 # All components inherited here go to system image
 #
-ifeq (,$(filter %tangor tangor% %_64,$(TARGET_PRODUCT)))
-$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
-else
+DEVICE_IS_64BIT_ONLY ?= $(if $(filter %_64,$(TARGET_PRODUCT)), true, false)
+
+ifeq ($(DEVICE_IS_64BIT_ONLY),true)
 $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
+else
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
 endif
 
 $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk)