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

Commit 81fd6b48 authored by Philipp Hasper's avatar Philipp Hasper Committed by Narayan Kamath
Browse files

Fixed calendar fields comparison

Month was compared with the day and vice versa.
Found by dukejeffrie.

Change-Id: Ic4efca440c408325819ff1df85db7b407cf3207e
parent 766e2050
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -999,8 +999,8 @@ public class DatePicker extends FrameLayout {

        private boolean isNewDate(int year, int month, int dayOfMonth) {
            return (mCurrentDate.get(Calendar.YEAR) != year
                    || mCurrentDate.get(Calendar.MONTH) != dayOfMonth
                    || mCurrentDate.get(Calendar.DAY_OF_MONTH) != month);
                    || mCurrentDate.get(Calendar.MONTH) != month
                    || mCurrentDate.get(Calendar.DAY_OF_MONTH) != dayOfMonth);
        }

        private void setDate(int year, int month, int dayOfMonth) {