summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kyeongkab.Nam <Kyeongkab.Nam@sony.com> 2019-11-22 11:38:16 +0900
committer Kyeongkab.Nam <Kyeongkab.Nam@sony.com> 2019-11-22 13:36:21 +0900
commitc49971469f9a95842b05d2b90da7fb1aab84a8d2 (patch)
tree060c052e854c52e34d2d94ef49b5a97dd1cd6fea
parentbdebb171cc32acd5ef52868ca073d52e5f39697d (diff)
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
-rwxr-xr-x[-rw-r--r--]java/app.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/java/app.go b/java/app.go
index c63570366..c772e4768 100644..100755
--- a/java/app.go
+++ b/java/app.go
@@ -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)