Merge "androidmk suport for aidl includes using LOCAL_PATH"
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index bdd3e97..469e960 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -27,6 +27,7 @@
 
 var rewriteProperties = map[string](func(variableAssignmentContext) error){
 	// custom functions
+	"LOCAL_AIDL_INCLUDES":         localAidlIncludes,
 	"LOCAL_C_INCLUDES":            localIncludeDirs,
 	"LOCAL_EXPORT_C_INCLUDE_DIRS": exportIncludeDirs,
 	"LOCAL_LDFLAGS":               ldflags,
@@ -111,7 +112,6 @@
 			"LOCAL_DX_FLAGS":              "dxflags",
 			"LOCAL_JAVA_LIBRARIES":        "libs",
 			"LOCAL_STATIC_JAVA_LIBRARIES": "static_libs",
-			"LOCAL_AIDL_INCLUDES":         "aidl.include_dirs",
 			"LOCAL_AAPT_FLAGS":            "aaptflags",
 			"LOCAL_PACKAGE_SPLITS":        "package_splits",
 			"LOCAL_COMPATIBILITY_SUITE":   "test_suites",
@@ -308,6 +308,10 @@
 	return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "export_include_dirs", "local": "export_include_dirs"})
 }
 
+func localAidlIncludes(ctx variableAssignmentContext) error {
+	return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "aidl.include_dirs", "local": "aidl.local_include_dirs"})
+}
+
 func stem(ctx variableAssignmentContext) error {
 	val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.StringType)
 	if err != nil {
diff --git a/androidmk/cmd/androidmk/androidmk_test.go b/androidmk/cmd/androidmk/androidmk_test.go
index 037ce26..664d12c 100644
--- a/androidmk/cmd/androidmk/androidmk_test.go
+++ b/androidmk/cmd/androidmk/androidmk_test.go
@@ -407,6 +407,24 @@
 
 }`,
 	},
+	{
+
+		desc: "LOCAL_AIDL_INCLUDES",
+		in: `
+include $(CLEAR_VARS)
+LOCAL_MODULE := iAmAModule
+LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/src/main/java system/core
+include $(BUILD_SHARED_LIBRARY)`,
+
+		expected: `
+cc_library_shared {
+  name: "iAmAModule",
+  aidl: {
+    include_dirs: ["system/core"],
+    local_include_dirs: ["src/main/java"],
+  }
+}`,
+	},
 }
 
 func reformatBlueprint(input string) string {