Use 'stem' to override APK name
When android_app.stem is set, use it as the APK name like other module types. Bug: 193504286 Test: m (soong test) Change-Id: I4c95b77be382cff3cfecaf6ce38f99aed9f3238f
This commit is contained in:
@@ -621,7 +621,7 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
a.aapt.useEmbeddedDex = Bool(a.appProperties.Use_embedded_dex)
|
||||
|
||||
// Check if the install APK name needs to be overridden.
|
||||
a.installApkName = ctx.DeviceConfig().OverridePackageNameFor(a.Name())
|
||||
a.installApkName = ctx.DeviceConfig().OverridePackageNameFor(a.Stem())
|
||||
|
||||
if ctx.ModuleName() == "framework-res" {
|
||||
// framework-res.apk is installed as system/framework/framework-res.apk
|
||||
@@ -1006,6 +1006,7 @@ func (a *AndroidTest) FixTestConfig(ctx android.ModuleContext, testConfig androi
|
||||
command := rule.Command().BuiltTool("test_config_fixer").Input(testConfig).Output(fixedConfig)
|
||||
fixNeeded := false
|
||||
|
||||
// Auto-generated test config uses `ModuleName` as the APK name. So fix it if it is not the case.
|
||||
if ctx.ModuleName() != a.installApkName {
|
||||
fixNeeded = true
|
||||
command.FlagWithArg("--test-file-name ", a.installApkName+".apk")
|
||||
|
Reference in New Issue
Block a user