Update RECOVERY_VARIANT blocking to use project-path-for
Using RECOVERY_VARIANT to allow recovery to reside at
bootable/recovery-(variant) has changed at CM. project-path-for now
handles all the path re-mapping. This is simply a compatibility update
to be able to continue using RECOVERY_VARIANT with TWRP in a CM tree.
Change-Id: I66769d85b2a111e837f206b1c9a5bc07d6ac0d86
diff --git a/Android.mk b/Android.mk
index 10dc79f..03e1a69 100644
--- a/Android.mk
+++ b/Android.mk
@@ -14,13 +14,17 @@
LOCAL_PATH := $(call my-dir)
-ifeq ($(RECOVERY_VARIANT),)
-ifeq ($(LOCAL_PATH),bootable/recovery)
-RECOVERY_VARIANT := twrp
-endif
+ifdef project-path-for
+ ifeq ($(LOCAL_PATH),$(call project-path-for,recovery))
+ PROJECT_PATH_AGREES := true
+ endif
+else
+ ifeq ($(LOCAL_PATH),bootable/recovery)
+ PROJECT_PATH_AGREES := true
+ endif
endif
-ifeq ($(RECOVERY_VARIANT),twrp)
+ifeq ($(PROJECT_PATH_AGREES),true)
include $(CLEAR_VARS)