Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b426482 authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

Disable view compiler for protected storage

Protected storage has selinux restrictions that currently prevent
views being generated there.

(cherry picked from commit c8aa8ff3)

Bug: 111895153
Bug: 123778117
Test: manual
Exempt-From-Owner-Approval: cherry-pick

Merged-In: Id386ebd1be7329ab1ea9657187dfbabb4f1bf73c
Change-Id: Id386ebd1be7329ab1ea9657187dfbabb4f1bf73c
parent 6bb71b03
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 +