diff options
author | Jeongik Cha <jeongik@google.com> | 2021-07-08 01:13:11 +0900 |
---|---|---|
committer | Yi-Yo Chiang <yochiang@google.com> | 2021-07-15 15:22:17 +0800 |
commit | 99aa53c0ca6687a30729b9c9eb1189b53a06a822 (patch) | |
tree | 9f6fc0a032191c4dd7efdcf348189f5fbb7ccfeb /java/java.go | |
parent | c2ec729faf49d70cc0813589903382e9bb1c1eb9 (diff) |
SdkLibraryImport's DexJarInstallPath uses installPath from source module
Even though actual installed module path is the same as source module,
it uses impl's one.
Bug: 188179858
Bug: 193082464
Test: compare dexpreopt_config.zip files from
1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
2. m dexpreopt_config_zip
(note that m clean should run between steps)
Test: build aosp_cf_x86_64_phone, launch_cvd, and then
adb wait-for-device \
&& adb root \
&& adb logcat \
| grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C 1
and then check if there is no message.
Change-Id: I34ffd9a2d214a6614c2befc35b2beec003cfcd25
(cherry picked from commit d5fe8782e089ec1539a133f270aa62f5d3ead61a)
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go index 71c1b3324..185a44d99 100644 --- a/java/java.go +++ b/java/java.go @@ -1166,7 +1166,8 @@ type Import struct { properties ImportProperties // output file containing classes.dex and resources - dexJarFile android.Path + dexJarFile android.Path + dexJarInstallFile android.Path combinedClasspathFile android.Path classLoaderContexts dexpreopt.ClassLoaderContextMap @@ -1311,6 +1312,7 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) { di := ctx.OtherModuleProvider(deapexerModule, android.DeapexerProvider).(android.DeapexerInfo) if dexOutputPath := di.PrebuiltExportPath(apexRootRelativePathToJavaLib(j.BaseModuleName())); dexOutputPath != nil { j.dexJarFile = dexOutputPath + j.dexJarInstallFile = android.PathForModuleInPartitionInstall(ctx, "apex", ai.ApexVariationName, apexRootRelativePathToJavaLib(j.BaseModuleName())) // Initialize the hiddenapi structure. j.initHiddenAPI(ctx, dexOutputPath, outputFile, nil) @@ -1351,6 +1353,7 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) { dexOutputFile = j.hiddenAPIEncodeDex(ctx, dexOutputFile) j.dexJarFile = dexOutputFile + j.dexJarInstallFile = android.PathForModuleInstall(ctx, "framework", jarName) } } @@ -1392,7 +1395,7 @@ func (j *Import) DexJarBuildPath() android.Path { } func (j *Import) DexJarInstallPath() android.Path { - return nil + return j.dexJarInstallFile } func (j *Import) ClassLoaderContexts() dexpreopt.ClassLoaderContextMap { |