fdroiddata/metadata/org.mozilla.fennec_fdroid/36.0.4-android-22-a.patch

61 lines
2.4 KiB
Diff
Raw Normal View History

2015-03-23 23:22:37 +00:00
diff --git a/mobile/android/base/widget/DateTimePicker.java b/mobile/android/base/widget/DateTimePicker.java
--- a/mobile/android/base/widget/DateTimePicker.java
+++ b/mobile/android/base/widget/DateTimePicker.java
@@ -42,16 +42,19 @@ import android.widget.NumberPicker;
public class DateTimePicker extends FrameLayout {
private static final boolean DEBUG = true;
private static final String LOGTAG = "GeckoDateTimePicker";
private static final int DEFAULT_START_YEAR = 1;
private static final int DEFAULT_END_YEAR = 9999;
// Minimal screen width (in inches) for which we can show the calendar;
private static final int SCREEN_SIZE_THRESHOLD = 5;
+ private static final char DATE_FORMAT_DAY = 'd';
+ private static final char DATE_FORMAT_MONTH = 'M';
+ private static final char DATE_FORMAT_YEAR = 'y';
boolean mYearEnabled = true;
boolean mMonthEnabled = true;
boolean mWeekEnabled;
boolean mDayEnabled = true;
boolean mHourEnabled = true;
boolean mMinuteEnabled = true;
boolean mIs12HourMode;
@@ -387,31 +390,33 @@ public class DateTimePicker extends Fram
public long getTimeInMillis(){
return mCurrentDate.getTimeInMillis();
}
private void reorderDateSpinners() {
mDateSpinners.removeAllViews();
char[] order = DateFormat.getDateFormatOrder(getContext());
final int spinnerCount = order.length;
+
for (int i = 0; i < spinnerCount; i++) {
switch (order[i]) {
- case DateFormat.DATE:
+ case DATE_FORMAT_DAY:
mDateSpinners.addView(mDaySpinner);
break;
- case DateFormat.MONTH:
+ case DATE_FORMAT_MONTH:
mDateSpinners.addView(mMonthSpinner);
break;
- case DateFormat.YEAR:
+ case DATE_FORMAT_YEAR:
mDateSpinners.addView(mYearSpinner);
break;
default:
throw new IllegalArgumentException();
}
}
+
mDateSpinners.addView(mWeekSpinner);
}
void setDate(Calendar calendar){
mCurrentDate = mTempDate;
if (mCurrentDate.before(mMinDate)) {
mCurrentDate.setTimeInMillis(mMinDate.getTimeInMillis());
} else if (mCurrentDate.after(mMaxDate)) {