helloworld1 / AnyMemo

Advanced Spaced Repetition flashcard learning software for Android.
http://www.anymemo.org
GNU General Public License v2.0
151 stars 53 forks source link

NumberFormatException #454

Open tianxiaogu opened 6 years ago

tianxiaogu commented 6 years ago

The input may not be a valid int number. Reproduce:

  1. Set a very large number in Options -> Max recent list size
    // java.lang.NumberFormatException: Invalid int: "817737007732267"
    //  at java.lang.Integer.invalidInt(Integer.java:138)
    //  at java.lang.Integer.parse(Integer.java:413)
    //  at java.lang.Integer.parseInt(Integer.java:367)
    //  at java.lang.Integer.parseInt(Integer.java:334)
    //  at org.liberty.android.fantastischmemo.ui.widgets.IntegerEditTextPreference.persistString(IntegerEditTextPreference.java:75)
    //  at android.preference.EditTextPreference.setText(EditTextPreference.java:92)
    //  at android.preference.EditTextPreference.onDialogClosed(EditTextPreference.java:146)
    //  at android.preference.DialogPreference.onDismiss(DialogPreference.java:395)
    //  at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1323)
    //  at android.os.Handler.dispatchMessage(Handler.java:102)
    //  at android.os.Looper.loop(Looper.java:148)
    //  at android.app.ActivityThread.main(ActivityThread.java:5417)
    //  at java.lang.reflect.Method.invoke(Native Method)
    //  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    //  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)