Merge "Fix easter egg setting validator to accept valid values" into mnc-dev
This commit is contained in:
@@ -3102,7 +3102,16 @@ public final class Settings {
|
|||||||
public static final String EGG_MODE = "egg_mode";
|
public static final String EGG_MODE = "egg_mode";
|
||||||
|
|
||||||
/** @hide */
|
/** @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
|
* IMPORTANT: If you add a new public settings you also have to add it to
|
||||||
|
|||||||
Reference in New Issue
Block a user