summaryrefslogtreecommitdiff
path: root/java/android_manifest.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/android_manifest.go')
-rw-r--r--java/android_manifest.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/java/android_manifest.go b/java/android_manifest.go
index 859900376..0c77968e6 100644
--- a/java/android_manifest.go
+++ b/java/android_manifest.go
@@ -71,12 +71,15 @@ func shouldReturnFinalOrFutureInt(ctx android.ModuleContext, targetSdkVersionLev
return targetSdkVersionLevel.IsPreview() && (ctx.Config().UnbundledBuildApps() || includedInMts(ctx.Module()))
}
-// Helper function that casts android.Module to java.androidTestApp
-// If this type conversion is possible, it queries whether the test app is included in an MTS suite
+// Helper function that returns true if android_test, android_test_helper_app, java_test are in an MTS suite.
func includedInMts(module android.Module) bool {
if test, ok := module.(androidTestApp); ok {
return test.includedInTestSuite("mts")
}
+ // java_test
+ if test, ok := module.(*Test); ok {
+ return android.PrefixInList(test.testProperties.Test_suites, "mts")
+ }
return false
}