Simplify and fix AOSP guard
Change-Id: I2f01a16b3fc16602fa2f1675ae6ebbcb7ece6ff5
diff --git a/os_pickup_aosp.mk b/os_pickup_aosp.mk
index b3c6bc2..343a28e 100644
--- a/os_pickup_aosp.mk
+++ b/os_pickup_aosp.mk
@@ -1,14 +1,11 @@
# This file guards most of hardware/qcom/* from
# being used on devices which use hardware/qcom-caf/*
-# Legacy CAF devices still want AOSP keymaster HAL.
-CAF_DIRS := keymaster
LOCAL_PATH := $(call my-dir)
+# Legacy CAF devices still want AOSP keymaster HAL.
ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
-# convert CAF_DIRS to something we can give to filter
-filter_CAF_DIRS := $(foreach dir,$(CAF_DIRS),%/$(dir)/Android.mk)
-include $(filter,$(filter_CAF_DIRS),$(call first-makefiles-under,$(LOCAL_PATH)))
+include $(LOCAL_PATH)/keymaster/Android.mk
else
include $(call first-makefiles-under,$(LOCAL_PATH))
endif