Snap for 6469738 from 1daf5bbe4a6d3d9f60c0e6fbe58c513fe6785638 to rvc-d1-release

Change-Id: Id6d918a21453f00fb28b6cad932d37174dc65b87
diff --git a/build/hidl_interface.go b/build/hidl_interface.go
index 71f4a68..ebc2dc5 100644
--- a/build/hidl_interface.go
+++ b/build/hidl_interface.go
@@ -129,6 +129,9 @@
 
 	var inheritanceHierarchyOutputs android.Paths
 	ctx.VisitDirectDeps(func(m android.Module) {
+		if !m.ExportedToMake() {
+			return
+		}
 		if t, ok := m.(*hidlGenRule); ok {
 			if t.properties.Language == "inheritance-hierarchy" {
 				inheritanceHierarchyOutputs = append(inheritanceHierarchyOutputs, t.genOutputs.Paths()...)
@@ -893,17 +896,15 @@
 		Inputs:     i.properties.Srcs,
 	})
 
-	if i.ModuleBase.ExportedToMake() {
-		mctx.CreateModule(hidlGenFactory, &nameProperties{
-			Name: proptools.StringPtr(name.inheritanceHierarchyName()),
-		}, &hidlGenProperties{
-			Language:   "inheritance-hierarchy",
-			FqName:     name.string(),
-			Root:       i.properties.Root,
-			Interfaces: i.properties.Interfaces,
-			Inputs:     i.properties.Srcs,
-		})
-	}
+	mctx.CreateModule(hidlGenFactory, &nameProperties{
+		Name: proptools.StringPtr(name.inheritanceHierarchyName()),
+	}, &hidlGenProperties{
+		Language:   "inheritance-hierarchy",
+		FqName:     name.string(),
+		Root:       i.properties.Root,
+		Interfaces: i.properties.Interfaces,
+		Inputs:     i.properties.Srcs,
+	})
 }
 
 func (h *hidlInterface) Name() string {