Fix split apk paths.
Soong has been outputting incorrect Android.mk entries for split apks. soong_app_prebuilt.mk expects LOCAL_SOONG_BUILT_INSTALLED to contain a list of <split apk path>:<on device install path> pairs whereas Soong outputs <split apk path>:$(LOCAL_MODULE_PATH)/<split apk filename> pairs. This also adds a missing underscore in split apk filenames. Test: m Split Bug: 140795853 Change-Id: I3d6506f5e12106174fbbaef34749a272b5e1b90c
This commit is contained in:
parent
0949f31657
commit
7dd4ae2fb9
|
@ -329,7 +329,8 @@ func (app *AndroidApp) AndroidMkEntries() android.AndroidMkEntries {
|
|||
entries.SetString("LOCAL_SOONG_BUILT_INSTALLED", app.dexpreopter.builtInstalled)
|
||||
}
|
||||
for _, split := range app.aapt.splits {
|
||||
install := "$(LOCAL_MODULE_PATH)/" + strings.TrimSuffix(app.installApkName, ".apk") + split.suffix + ".apk"
|
||||
install := app.onDeviceDir + "/" +
|
||||
strings.TrimSuffix(app.installApkName, ".apk") + "_" + split.suffix + ".apk"
|
||||
entries.AddStrings("LOCAL_SOONG_BUILT_INSTALLED", split.path.String()+":"+install)
|
||||
}
|
||||
},
|
||||
|
|
|
@ -128,6 +128,8 @@ type AndroidApp struct {
|
|||
|
||||
installDir android.OutputPath
|
||||
|
||||
onDeviceDir string
|
||||
|
||||
additionalAaptFlags []string
|
||||
|
||||
noticeOutputs android.NoticeOutputs
|
||||
|
@ -449,6 +451,7 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) {
|
|||
} else {
|
||||
a.installDir = android.PathForModuleInstall(ctx, "app", a.installApkName)
|
||||
}
|
||||
a.onDeviceDir = android.InstallPathToOnDevicePath(ctx, a.installDir)
|
||||
|
||||
a.noticeBuildActions(ctx)
|
||||
if Bool(a.appProperties.Embed_notices) || ctx.Config().IsEnvTrue("ALWAYS_EMBED_NOTICES") {
|
||||
|
|
Loading…
Reference in New Issue