diff options
author | 2020-10-07 17:58:00 +0000 | |
---|---|---|
committer | 2020-10-07 17:58:00 +0000 | |
commit | 43159bd1b7c99790d84fdedda09db3701d466f30 (patch) | |
tree | 35345376d9aa3db8fde6b578017b99894a2c01ea /java/hiddenapi_singleton.go | |
parent | a87ea4587da10cc9da000d4ea4b11b1aa7806e7a (diff) | |
parent | 56a8321c210bf73c7b9f177849ff4a6b6192d237 (diff) |
Merge "Remove global state from apex modules"
Diffstat (limited to 'java/hiddenapi_singleton.go')
-rw-r--r-- | java/hiddenapi_singleton.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go index 61a9b97e4..b140b899b 100644 --- a/java/hiddenapi_singleton.go +++ b/java/hiddenapi_singleton.go @@ -161,10 +161,9 @@ func stubFlagsRule(ctx android.SingletonContext) { // For a java lib included in an APEX, only take the one built for // the platform variant, and skip the variants for APEXes. // Otherwise, the hiddenapi tool will complain about duplicated classes - if a, ok := module.(android.ApexModule); ok { - if android.InAnyApex(module.Name()) && !a.IsForPlatform() { - return - } + apexInfo := ctx.ModuleProvider(module, android.ApexInfoProvider).(android.ApexInfo) + if !apexInfo.IsForPlatform() { + return } bootDexJars = append(bootDexJars, jar) |