Merge "Disable view compiler for protected storage"

am: e396fe4a02

Change-Id: Ia815484a262da85967691807ae575c451aefb043
This commit is contained in:
Mathieu Chartier
2019-02-08 05:47:27 -08:00
committed by android-build-merger

View File

@@ -480,8 +480,10 @@ public class ArtManagerService extends android.content.pm.dex.IArtManager.Stub {
final String apkPath = pkg.baseCodePath;
final ApplicationInfo appInfo = pkg.applicationInfo;
final String outDexFile = appInfo.dataDir + "/code_cache/compiled_view.dex";
if (appInfo.isPrivilegedApp()) {
if (appInfo.isPrivilegedApp() || appInfo.isDefaultToDeviceProtectedStorage()) {
// Privileged apps prefer to load trusted code so they don't use compiled views.
// Also disable the view compiler for protected storage apps since there are
// selinux permissions required for writing to user_de.
return false;
}
Log.i("PackageManager", "Compiling layouts in " + packageName + " (" + apkPath +