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

Commit b1918a05 authored by Svet Ganov's avatar Svet Ganov
Browse files

Fix easter egg setting validator to accept valid values

bug:21188928

Change-Id: I5f6d445aad7231a907026c552c87f9cdfe024d32
parent fcb34c59
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -3102,7 +3102,16 @@ public final class Settings {
        public static final String EGG_MODE = "egg_mode";

        /** @hide */
        public static final Validator EGG_MODE_VALIDATOR = sBooleanValidator;
        public static final Validator EGG_MODE_VALIDATOR = new Validator() {
            @Override
            public boolean validate(String value) {
                try {
                    return Long.parseLong(value) >= 0;
                } catch (NumberFormatException e) {
                    return false;
                }
            }
        };

        /**
         * IMPORTANT: If you add a new public settings you also have to add it to