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

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

Merge "Update the DM sysprop flags to override gantry's" into main

parents 927dfc77 f088d160
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -138,19 +138,20 @@ public class DisplayManagerFlags {
        }

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