Sandbox inputs to aidl rule in cc

Bug: 279960133
Test: go test
Test: Remove hdrs prop from IDropBoxManagerService_aidl && run  BUILD_BROKEN_DISABLE_BAZEL=true m libservices && Expect an error from aidl
Change-Id: Ifdb260d8e2da9a5767f1e212393de4134b210616
diff --git a/aidl_library/aidl_library_test.go b/aidl_library/aidl_library_test.go
index d9b410a..d9dd245 100644
--- a/aidl_library/aidl_library_test.go
+++ b/aidl_library/aidl_library_test.go
@@ -37,7 +37,7 @@
 			aidl_library {
 					name: "foo",
 					srcs: ["a/b/Foo.aidl"],
-					hdrs: ["Header.aidl"],
+					hdrs: ["a/Header.aidl"],
 					strip_import_prefix: "a",
 					deps: ["bar"],
 				}
@@ -61,6 +61,13 @@
 		[]string{"package_foo/a/b/Foo.aidl"},
 		actualInfo.Srcs,
 	)
+
+	android.AssertPathsRelativeToTopEquals(
+		t,
+		"aidl hdrs paths",
+		[]string{"package_foo/a/Header.aidl"},
+		actualInfo.Hdrs.ToList(),
+	)
 }
 
 func TestAidlLibraryWithoutStripImportPrefix(t *testing.T) {
@@ -72,6 +79,7 @@
 			aidl_library {
 					name: "bar",
 					srcs: ["x/y/Bar.aidl"],
+					hdrs: ["BarHeader.aidl"],
 				}
 			`),
 		}.AddToFixture(),
@@ -80,7 +88,6 @@
 			aidl_library {
 					name: "foo",
 					srcs: ["a/b/Foo.aidl"],
-					hdrs: ["Header.aidl"],
 					deps: ["bar"],
 				}
 			`),
@@ -103,6 +110,13 @@
 		[]string{"package_foo/a/b/Foo.aidl"},
 		actualInfo.Srcs,
 	)
+
+	android.AssertPathsRelativeToTopEquals(
+		t,
+		"aidl hdrs paths",
+		[]string{"package_bar/BarHeader.aidl"},
+		actualInfo.Hdrs.ToList(),
+	)
 }
 
 func TestAidlLibraryWithNoSrcsHdrsDeps(t *testing.T) {