summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-03-01 17:04:39 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-03-01 17:04:39 +0000
commit69804ac3886c7ef1d787efea029f2d62cef203b0 (patch)
tree8e743a0ed9bb6a933f8e0827fb7e884eea918eed /java
parent0a8d5248ef04a014d56ea18b27415969423dc323 (diff)
parent3785673f9be9d3e0627d03c067e1b5f14a57a14f (diff)
Merge "Allow java_sdk_library_import to contribute to hiddenapi processing"
Diffstat (limited to 'java')
-rw-r--r--java/sdk_library.go4
-rw-r--r--java/testing.go1
2 files changed, 5 insertions, 0 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go
index e0100d437..30d120d5c 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -1772,6 +1772,8 @@ type SdkLibraryImport struct {
android.ApexModuleBase
android.SdkBase
+ hiddenAPI
+
properties sdkLibraryImportProperties
// Map from api scope to the scope specific property structure.
@@ -2046,6 +2048,8 @@ func (module *SdkLibraryImport) GenerateAndroidBuildActions(ctx android.ModuleCo
di := ctx.OtherModuleProvider(deapexerModule, android.DeapexerProvider).(android.DeapexerInfo)
if dexOutputPath := di.PrebuiltExportPath(module.BaseModuleName(), ".dexjar"); dexOutputPath != nil {
module.dexJarFile = dexOutputPath
+ module.initHiddenAPI(ctx, module.configurationName)
+ module.hiddenAPIExtractInformation(ctx, dexOutputPath, module.findScopePaths(apiScopePublic).stubsImplPath[0])
} else {
// This should never happen as a variant for a prebuilt_apex is only created if the
// prebuilt_apex has been configured to export the java library dex file.
diff --git a/java/testing.go b/java/testing.go
index 781106ff2..bfa1e6b2a 100644
--- a/java/testing.go
+++ b/java/testing.go
@@ -240,6 +240,7 @@ func CheckModuleDependencies(t *testing.T, ctx *android.TestContext, name, varia
}
func CheckHiddenAPIRuleInputs(t *testing.T, expected string, hiddenAPIRule android.TestingBuildParams) {
+ t.Helper()
actual := strings.TrimSpace(strings.Join(android.NormalizePathsForTesting(hiddenAPIRule.Implicits), "\n"))
expected = strings.TrimSpace(expected)
if actual != expected {