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

Commit 85bf0978 authored by Pierre Barbier de Reuille's avatar Pierre Barbier de Reuille
Browse files

Only allow dynamic override for eng and userdebug builds

First, this is better for security, then it will improve the performance
of the user builds significantly.

Bug: 416813838
Test: Manual
Flag: EXEMPT (flag infra)
Change-Id: I0c05b1675a04496a4c6b40e985e4480a4aa3b91a
parent 679475ec
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityThread;
import android.content.Context;
import android.os.Build;
import android.os.SystemProperties;
import android.util.ArrayMap;
import android.util.Log;
@@ -378,6 +379,9 @@ public enum DesktopExperienceFlags {

    private static boolean checkIfFlagShouldBeOverridden(@Nullable String flagName,
            boolean defaultValue) {
        if (!Build.IS_ENG && !Build.IS_USERDEBUG) {
            return defaultValue;
        }
        if (!Flags.showDesktopExperienceDevOption() || enableDisplayContentModeManagement()) {
            return false;
        }