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

Commit 6870c879 authored by Pierre Barbier de Reuille's avatar Pierre Barbier de Reuille Committed by Android (Google) Code Review
Browse files

Merge "Simplify DisplayManager flag library" into main

parents 7c95857c 0ff15be7
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -129,7 +129,6 @@ public class DisplayManagerFlags {
            mFlagFunction = flagFunction;
        }

        // TODO(b/297159910): Simplify using READ-ONLY flags when available.
        private boolean isEnabled() {
            if (mEnabledSet) {
                if (DEBUG) {
@@ -146,14 +145,7 @@ public class DisplayManagerFlags {
        }

        private boolean flagOrSystemProperty(Supplier<Boolean> flagFunction, String flagName) {
            boolean flagValue = false;
            try {
                flagValue = flagFunction.get();
            } catch (Throwable ex) {
                if (DEBUG) {
                    Slog.i(TAG, "Flags not ready yet. Return false for " + flagName, ex);
                }
            }
            boolean flagValue = flagFunction.get();
            // TODO(b/299462337) Remove when the infrastructure is ready.
            if (Build.IS_ENG || Build.IS_USERDEBUG) {
                return SystemProperties.getBoolean("persist.sys." + flagName + "-override",