Merge "Store uncompressed and aligned DEX files for java libs in APEXes." am: 28e36b1455
am: 6a517467aa
am: 7bd4aa2853
Change-Id: I204fa801fa92b9603d4adb26f070310bc8b48955
This commit is contained in:
commit
a3e117d183
2 changed files with 6 additions and 1 deletions
|
@ -3014,7 +3014,7 @@ func TestApexWithApps(t *testing.T) {
|
||||||
ensureContains(t, copyCmds, "image.apex/priv-app/AppFooPriv/AppFooPriv.apk")
|
ensureContains(t, copyCmds, "image.apex/priv-app/AppFooPriv/AppFooPriv.apk")
|
||||||
|
|
||||||
// JNI libraries are embedded inside APK
|
// JNI libraries are embedded inside APK
|
||||||
appZipRule := ctx.ModuleForTests("AppFoo", "android_common_myapex").Rule("zip")
|
appZipRule := ctx.ModuleForTests("AppFoo", "android_common_myapex").Description("zip jni lib")
|
||||||
libjniOutput := ctx.ModuleForTests("libjni", "android_arm64_armv8-a_shared_myapex").Module().(*cc.Module).OutputFile()
|
libjniOutput := ctx.ModuleForTests("libjni", "android_arm64_armv8-a_shared_myapex").Module().(*cc.Module).OutputFile()
|
||||||
ensureListContains(t, appZipRule.Implicits.Strings(), libjniOutput.String())
|
ensureListContains(t, appZipRule.Implicits.Strings(), libjniOutput.String())
|
||||||
// ... uncompressed
|
// ... uncompressed
|
||||||
|
|
|
@ -1727,6 +1727,11 @@ type Library struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func shouldUncompressDex(ctx android.ModuleContext, dexpreopter *dexpreopter) bool {
|
func shouldUncompressDex(ctx android.ModuleContext, dexpreopter *dexpreopter) bool {
|
||||||
|
// Store uncompressed (and aligned) any dex files from jars in APEXes.
|
||||||
|
if am, ok := ctx.Module().(android.ApexModule); ok && !am.IsForPlatform() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
// Store uncompressed (and do not strip) dex files from boot class path jars.
|
// Store uncompressed (and do not strip) dex files from boot class path jars.
|
||||||
if inList(ctx.ModuleName(), ctx.Config().BootJars()) {
|
if inList(ctx.ModuleName(), ctx.Config().BootJars()) {
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue