diff options
| author | 2020-01-02 23:18:04 -0800 | |
|---|---|---|
| committer | 2020-01-02 23:18:04 -0800 | |
| commit | e0e165f06ef1228003404082fcc28273dde37f7c (patch) | |
| tree | b733d061277c9536ef046fb97e84b179fbd1aee0 | |
| parent | 11caff98ff43368c95c9e5f67af1da235a9f6fcf (diff) | |
| parent | cbfcd44f68459e8fb8f58ab5998e316bfc206f8f (diff) | |
Merge "Use ro.product.vndk.version for unbundled product apks"
am: cbfcd44f68
Change-Id: I49b3841f627a6e8b25e91e02dce491cb526886d9
| -rw-r--r-- | core/java/android/app/LoadedApk.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index f0b354650cf4..4efaaad91eb6 100644 --- a/core/java/android/app/LoadedApk.java +++ b/core/java/android/app/LoadedApk.java @@ -46,7 +46,7 @@ import android.os.StrictMode; import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; -import android.sysprop.ProductProperties; +import android.sysprop.VndkProperties; import android.text.TextUtils; import android.util.AndroidRuntimeException; import android.util.ArrayMap; @@ -785,13 +785,12 @@ public final class LoadedApk { // Similar to vendor apks, we should add /product/lib for apks from product partition // 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. + // exist from legacy device while product apks are bundled. To make this clear, we use + // "ro.product.vndk.version" property. If the property is defined, we regard all product + // apks as unbundled. if (mApplicationInfo.getCodePath() != null - && 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) { + && mApplicationInfo.isProduct() + && VndkProperties.product_vndk_version().isPresent()) { isBundledApp = false; } |