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:
Jaewoong Jung
2019-09-27 17:13:15 -07:00
parent 0949f31657
commit 7dd4ae2fb9
2 changed files with 5 additions and 1 deletions

View File

@@ -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)
}
},