Fix incorrect install path for priv-app prebuilt
Dexpreopted files for privleged app prebuilt(android_app_import) are installed wrongly to /system/app. To fix this issue, install path is changed to /system/priv-app in the case that "privileged" flag is true. Bug: 144945646 Test: build and check dexpreopted files of privileged app are installed to /system/priv-app Change-Id: Iec140119f58179a3eb0feeff7af2699fcc855fe7
This commit is contained in:
parent
bdebb171cc
commit
c49971469f
|
@ -974,7 +974,13 @@ func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext
|
|||
jnisUncompressed := android.PathForModuleOut(ctx, "jnis-uncompressed", ctx.ModuleName()+".apk")
|
||||
a.uncompressEmbeddedJniLibs(ctx, srcApk, jnisUncompressed.OutputPath)
|
||||
|
||||
installDir := android.PathForModuleInstall(ctx, "app", a.BaseModuleName())
|
||||
var installDir android.InstallPath
|
||||
if Bool(a.properties.Privileged) {
|
||||
installDir = android.PathForModuleInstall(ctx, "priv-app", a.BaseModuleName())
|
||||
} else {
|
||||
installDir = android.PathForModuleInstall(ctx, "app", a.BaseModuleName())
|
||||
}
|
||||
|
||||
a.dexpreopter.installPath = installDir.Join(ctx, a.BaseModuleName()+".apk")
|
||||
a.dexpreopter.isInstallable = true
|
||||
a.dexpreopter.isPresignedPrebuilt = Bool(a.properties.Presigned)
|
||||
|
|
Loading…
Reference in New Issue