diff options
| author | 2021-05-14 18:53:43 +0000 | |
|---|---|---|
| committer | 2021-05-14 18:53:43 +0000 | |
| commit | fdd9743609e2b964db325bc06e96e906eeffa44b (patch) | |
| tree | 040938d58b81f8559afb27445da096b8b7a78a49 /java/hiddenapi.go | |
| parent | b7c78731d4cccf00645d8fb3d6ed9c692e4b83f7 (diff) | |
| parent | b6f53c064e66f1f7ded2121f9d592463d02e0bdd (diff) | |
Merge "Refactor special handling of hidden API encoding for master-art"
Diffstat (limited to 'java/hiddenapi.go')
| -rw-r--r-- | java/hiddenapi.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/java/hiddenapi.go b/java/hiddenapi.go index 2c0655f93..829c47383 100644 --- a/java/hiddenapi.go +++ b/java/hiddenapi.go @@ -92,6 +92,12 @@ func (h *hiddenAPI) initHiddenAPI(ctx android.BaseModuleContext, configurationNa h.configurationName = configurationName + // If the frameworks/base directories does not exist and no prebuilt hidden API flag files have + // been configured then it is not possible to do hidden API encoding. + if !ctx.Config().FrameworksBaseDirExists(ctx) && ctx.Config().PrebuiltHiddenApiDir(ctx) == "" { + return + } + // It is important that hiddenapi information is only gathered for/from modules that are actually // on the boot jars list because the runtime only enforces access to the hidden API for the // bootclassloader. If information is gathered for modules not on the list then that will cause @@ -303,11 +309,7 @@ func hiddenAPIEncodeDex(ctx android.ModuleContext, output android.WritablePath, } enforceHiddenApiFlagsToAllMembers := true - // If frameworks/base doesn't exist we must be building with the 'master-art' manifest. - // Disable assertion that all methods/fields have hidden API flags assigned. - if !ctx.Config().FrameworksBaseDirExists(ctx) { - enforceHiddenApiFlagsToAllMembers = false - } + // b/149353192: when a module is instrumented, jacoco adds synthetic members // $jacocoData and $jacocoInit. Since they don't exist when building the hidden API flags, // don't complain when we don't find hidden API flags for the synthetic members. |