Allow all of libcore to have NewApi warnings

Required due to minor refactor of libcore projects.
Bug: 208656169
Bug: 255273691
Test: TH
Change-Id: Ifd2ef6d3553ade5a059880398075c70635d428dd
diff --git a/java/lint.go b/java/lint.go
index fcd6d31..9827159 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -333,7 +333,7 @@
 		l.extraMainlineLintErrors = append(l.extraMainlineLintErrors, updatabilityChecks...)
 		// Skip lint warning checks for NewApi warnings for libcore where they come from source
 		// files that reference the API they are adding (b/208656169).
-		if ctx.ModuleDir() != "libcore" {
+		if !strings.HasPrefix(ctx.ModuleDir(), "libcore") {
 			_, filtered := android.FilterList(l.properties.Lint.Warning_checks, updatabilityChecks)
 
 			if len(filtered) != 0 {