Loading core/java/android/widget/DayPickerView.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -294,14 +294,15 @@ class DayPickerView extends ViewGroup { * @param animate whether to smooth scroll to the new position * @param animate whether to smooth scroll to the new position * @param setSelected whether to set the specified day as selected * @param setSelected whether to set the specified day as selected * * * @throws IllegalArgumentException as of {@link android.os.Build.VERSION_CODES#N_MR1} if the * @throws IllegalArgumentException if the build version is greater than * provided timeInMillis is before the range start or after the range end. * {@link android.os.Build.VERSION_CODES#N_MR1} and the provided timeInMillis is before * the range start or after the range end. */ */ private void setDate(long timeInMillis, boolean animate, boolean setSelected) { private void setDate(long timeInMillis, boolean animate, boolean setSelected) { getTempCalendarForTime(timeInMillis); getTempCalendarForTime(timeInMillis); final int targetSdkVersion = mContext.getApplicationInfo().targetSdkVersion; final int targetSdkVersion = mContext.getApplicationInfo().targetSdkVersion; if (targetSdkVersion >= N_MR1) { if (targetSdkVersion > N_MR1) { if (mTempCalendar.before(mMinDate) || mTempCalendar.after(mMaxDate)) { if (mTempCalendar.before(mMinDate) || mTempCalendar.after(mMaxDate)) { throw new IllegalArgumentException("timeInMillis must be between the values of " throw new IllegalArgumentException("timeInMillis must be between the values of " + "getMinDate() and getMaxDate()"); + "getMinDate() and getMaxDate()"); Loading Loading
core/java/android/widget/DayPickerView.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -294,14 +294,15 @@ class DayPickerView extends ViewGroup { * @param animate whether to smooth scroll to the new position * @param animate whether to smooth scroll to the new position * @param setSelected whether to set the specified day as selected * @param setSelected whether to set the specified day as selected * * * @throws IllegalArgumentException as of {@link android.os.Build.VERSION_CODES#N_MR1} if the * @throws IllegalArgumentException if the build version is greater than * provided timeInMillis is before the range start or after the range end. * {@link android.os.Build.VERSION_CODES#N_MR1} and the provided timeInMillis is before * the range start or after the range end. */ */ private void setDate(long timeInMillis, boolean animate, boolean setSelected) { private void setDate(long timeInMillis, boolean animate, boolean setSelected) { getTempCalendarForTime(timeInMillis); getTempCalendarForTime(timeInMillis); final int targetSdkVersion = mContext.getApplicationInfo().targetSdkVersion; final int targetSdkVersion = mContext.getApplicationInfo().targetSdkVersion; if (targetSdkVersion >= N_MR1) { if (targetSdkVersion > N_MR1) { if (mTempCalendar.before(mMinDate) || mTempCalendar.after(mMaxDate)) { if (mTempCalendar.before(mMinDate) || mTempCalendar.after(mMaxDate)) { throw new IllegalArgumentException("timeInMillis must be between the values of " throw new IllegalArgumentException("timeInMillis must be between the values of " + "getMinDate() and getMaxDate()"); + "getMinDate() and getMaxDate()"); Loading