diff options
| author | Kiyoung Kim <kiyoungkim@google.com> | 2019-04-09 19:01:33 -0700 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2019-04-09 19:01:33 -0700 |
| commit | dcdfdb9008d210bcee6fa15d73b1b201a2de81db (patch) | |
| tree | 7cf72d01bcc3e6aa89b8c05258625542ccdffab4 /core/java/android/app/LoadedApk.java | |
| parent | aaf529b9bd14a3f6b92b3c79c6d82de1e0e73093 (diff) | |
| parent | b3d1599e29649837cde7e625494704168626e7ba (diff) | |
Merge "Check if product app is unbundled from property." am: 2ed229287d
am: b3d1599e29
Change-Id: Iaf120c77b80b16a34920241341872d1ab8a8f5f0
Diffstat (limited to 'core/java/android/app/LoadedApk.java')
| -rw-r--r-- | core/java/android/app/LoadedApk.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index e16ce24cbb2c..a2c5e40a9957 100644 --- a/core/java/android/app/LoadedApk.java +++ b/core/java/android/app/LoadedApk.java @@ -46,6 +46,7 @@ import android.os.StrictMode; import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; +import android.sysprop.ProductProperties; import android.text.TextUtils; import android.util.AndroidRuntimeException; import android.util.ArrayMap; @@ -782,10 +783,13 @@ public final class LoadedApk { } // Similar to vendor apks, we should add /product/lib for apks from product partition - // and not having /product/lib in the default search path - final boolean treatProductApkAsUnbundled = !defaultSearchPaths.contains("/product/lib"); + // when product apps are marked as unbundled. We cannot use the same way from vendor + // to check if lib path exists because there is possibility that /product/lib would not + // exist from legacy device while product apks are bundled. To make this clear, new + // property ("ro.product.apps.unbundled") is defined which should be true only when + // product apks are unbundled. if (mApplicationInfo.getCodePath() != null - && mApplicationInfo.isProduct() && treatProductApkAsUnbundled + && mApplicationInfo.isProduct() && ProductProperties.unbundled_apps().orElse(false) // TODO(b/128557860): Change target SDK version when version code R is available. && getTargetSdkVersion() == Build.VERSION_CODES.CUR_DEVELOPMENT) { isBundledApp = false; |
