<commit_before>package org.commcare.dalvik.activities;

/**
 * Enum representing the different logical/UI states that you can be in while on the login screen
 *
 * @author <NAME> (<EMAIL>)
 */
public enum LoginMode {

    PASSWORD("<PASSWORD>"),
    PIN("pin-mode"),
    PRIMED("primed-mode");

    private String stringVersion;

    LoginMode(String s) {
        this.stringVersion = s;
    }

    @Override
    public String toString() {
        return this.stringVersion;
    }

    public static LoginMode fromString(String s) {
        switch(s) {
            case "password-mode":
                return PASSWORD;
            case "pin-mode":
                return PIN;
            case "primed-mode":
                return PRIMED;
            default:
                return null;
        }
    }
}<commit_msg>simplify LoginMode enum<commit_after>package org.commcare.dalvik.activities;

/**
 * Enum representing the different logical/UI states that you can be in while on the login screen
 *
 * @author <NAME> (<EMAIL>)
 */
public enum LoginMode {

    PASSWORD, PIN, PRIMED;

    public static LoginMode fromString(String s) {
        if (PASSWORD.toString().equals(s)) {
            return PASSWORD;
        } else if (PIN.toString().equals(s)) {
            return PIN;
        } else if (PRIMED.toString().equals(s)) {
            return PRIMED;
        } else {
            return null;
        }
    }
}
{'fraction_non_alphanumeric': 0.10711768851303735, 'fraction_numerical': 0.0, 'mean_word_length': 1.9957805907172996, 'pattern_counts': {'":': 3, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4038756', 'n_tokens_mistral': 419, 'n_tokens_neox': 398, 'n_words': 112}