Merge "Merge "Check if product app is unbundled from property." am: 2ed229287d am: b3d1599e29" into qt-dev-plus-aosp

This commit is contained in:
Android Build Merger (Role)
2019-04-10 02:02:22 +00:00
committed by Android (Google) Code Review

View File

@@ -46,6 +46,7 @@ import android.os.StrictMode;
import android.os.SystemProperties; import android.os.SystemProperties;
import android.os.Trace; import android.os.Trace;
import android.os.UserHandle; import android.os.UserHandle;
import android.sysprop.ProductProperties;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.AndroidRuntimeException; import android.util.AndroidRuntimeException;
import android.util.ArrayMap; 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 // Similar to vendor apks, we should add /product/lib for apks from product partition
// and not having /product/lib in the default search path // when product apps are marked as unbundled. We cannot use the same way from vendor
final boolean treatProductApkAsUnbundled = !defaultSearchPaths.contains("/product/lib"); // 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 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. // TODO(b/128557860): Change target SDK version when version code R is available.
&& getTargetSdkVersion() == Build.VERSION_CODES.CUR_DEVELOPMENT) { && getTargetSdkVersion() == Build.VERSION_CODES.CUR_DEVELOPMENT) {
isBundledApp = false; isBundledApp = false;