am 817f07ae: Fix the unstripped path if LOCAL_MODULE_PATH is set. DO NOT MERGE

Merge commit '817f07aef008dd3f32fed3603382123917fdec64' into gingerbread-plus-aosp

* commit '817f07aef008dd3f32fed3603382123917fdec64':
  Fix the unstripped path if LOCAL_MODULE_PATH is set. DO NOT MERGE
diff --git a/core/dynamic_binary.mk b/core/dynamic_binary.mk
index c04deef..0fa7647 100644
--- a/core/dynamic_binary.mk
+++ b/core/dynamic_binary.mk
@@ -14,7 +14,12 @@
 
 LOCAL_UNSTRIPPED_PATH := $(strip $(LOCAL_UNSTRIPPED_PATH))
 ifeq ($(LOCAL_UNSTRIPPED_PATH),)
-  LOCAL_UNSTRIPPED_PATH := $(TARGET_OUT_$(LOCAL_MODULE_CLASS)_UNSTRIPPED)
+  ifeq ($(LOCAL_MODULE_PATH),)
+    LOCAL_UNSTRIPPED_PATH := $(TARGET_OUT_$(LOCAL_MODULE_CLASS)_UNSTRIPPED)
+  else
+    # We have to figure out the corresponding unstripped path if LOCAL_MODULE_PATH is customized.
+    LOCAL_UNSTRIPPED_PATH := $(TARGET_OUT_UNSTRIPPED)/$(patsubst $(PRODUCT_OUT)/%,%,$(LOCAL_MODULE_PATH))
+  endif
 endif
 
 # The name of the target file, without any path prepended.