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

Commit 8b643a1c authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "DataPicker throwing ArrayIndexOutOfBoundsException" into gingerbread

parents b14fc638 b7084349
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -64,8 +64,7 @@ public class DatePicker extends FrameLayout {
    private final int MONTH_PICKER = 2;
    private final int YEAR_PICKER = 3;

    // List of pickers in the UI
    private PickersList mPickersList = new PickersList();
    // Format of the date
    private boolean isMediumDateFormat = true;

    /**
@@ -226,6 +225,9 @@ public class DatePicker extends FrameLayout {
        boolean quoted = false;
        boolean didDay = false, didMonth = false, didYear = false;

        // List of pickers in the UI
        PickersList mPickersList = new PickersList();

        for (int i = 0; i < order.length(); i++) {
            char c = order.charAt(i);

@@ -275,6 +277,11 @@ public class DatePicker extends FrameLayout {
        private int listIndex = 0;

        public void add(NumberPicker picker, int type) {
            // Do not add more than three items
            if (listIndex == 3) {
                return;
            }

            listOfNumberPickers[listIndex] = picker;
            listOfNumberPickersType[listIndex] = type;