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

Commit 8f1aba2e authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android (Google) Code Review
Browse files

Merge "Check null before passing to Integer.parseInt"

parents cf88cf65 f1f5ed54
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -273,6 +273,9 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
    public static int readKeyboardThemeIndex(final SharedPreferences prefs, final Resources res) {
        final int defaultThemeIndex = readDefaultKeyboardThemeIndex(res);
        final String themeIndexString = prefs.getString(PREF_KEYBOARD_LAYOUT, null);
        if (themeIndexString == null) {
            return defaultThemeIndex;
        }
        try {
            return Integer.parseInt(themeIndexString);
        } catch (final NumberFormatException e) {