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

Commit cbe39e55 authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

[view compilation] Add separate compilation property

Add separate compilation pm.precompile_layouts property for
precompiled layouts that controls compilation. Previously
this was controlled by view.precompiled_layout_enabled.

Movitation:
Enable view compilation without loading to get extra coverage.

(cherry picked from commit 9e7a5f60)

Bug: 111895153
Test: manual
Exempt-From-Owner-Approval: Previously approved by owner

Merged-In: Ica79ec076714f76d6ae75d398a2f62d7dd85a6a6
Change-Id: Ica79ec076714f76d6ae75d398a2f62d7dd85a6a6
parent 8d7976a3
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -450,8 +450,7 @@ public class PackageManagerService extends IPackageManager.Stub
    private static final boolean ENABLE_FREE_CACHE_V2 =
            SystemProperties.getBoolean("fw.free_cache_v2", true);
    private static final boolean PRECOMPILED_LAYOUT_ENABLED =
            SystemProperties.getBoolean("view.precompiled_layout_enabled", false);
    private static final String PRECOMPILE_LAYOUTS = "pm.precompile_layouts";
    private static final int RADIO_UID = Process.PHONE_UID;
    private static final int LOG_UID = Process.LOG_UID;
@@ -9180,7 +9179,7 @@ public class PackageManagerService extends IPackageManager.Stub
                pkgCompilationReason = PackageManagerService.REASON_BACKGROUND_DEXOPT;
            }
            if (PRECOMPILED_LAYOUT_ENABLED) {
            if (SystemProperties.getBoolean(PRECOMPILE_LAYOUTS, false)) {
                mArtManagerService.compileLayouts(pkg);
            }
@@ -17747,7 +17746,7 @@ public class PackageManagerService extends IPackageManager.Stub
        if (performDexopt) {
            // Compile the layout resources.
            if (PRECOMPILED_LAYOUT_ENABLED) {
            if (SystemProperties.getBoolean(PRECOMPILE_LAYOUTS, false)) {
                Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "compileLayouts");
                mArtManagerService.compileLayouts(pkg);
                Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);