summaryrefslogtreecommitdiff
path: root/java/bootclasspath_fragment.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/bootclasspath_fragment.go')
-rw-r--r--java/bootclasspath_fragment.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go
index 11634fabf..b28d70cab 100644
--- a/java/bootclasspath_fragment.go
+++ b/java/bootclasspath_fragment.go
@@ -827,7 +827,22 @@ func (b *BootclasspathFragmentModule) createHiddenAPIFlagInput(ctx android.Modul
// isTestFragment returns true if the current module is a test bootclasspath_fragment.
func (b *BootclasspathFragmentModule) isTestFragment() bool {
- return b.testFragment
+ if b.testFragment {
+ return true
+ }
+
+ // TODO(b/194063708): Once test fragments all use bootclasspath_fragment_test
+ // Some temporary exceptions until all test fragments use the
+ // bootclasspath_fragment_test module type.
+ name := b.BaseModuleName()
+ if strings.HasPrefix(name, "test_") {
+ return true
+ }
+ if name == "apex.apexd_test_bootclasspath-fragment" {
+ return true
+ }
+
+ return false
}
// produceHiddenAPIOutput produces the hidden API all-flags.csv file (and supporting files)