Home | History | Annotate | Download | only in recurrencepicker

Lines Matching refs:er

360     static public boolean canHandleRecurrenceRule(EventRecurrence er) {
361 switch (er.freq) {
371 if (er.count > 0 && !TextUtils.isEmpty(er.until)) {
376 // er.byday[]
380 * in er.byday[] and the "nth" is stored in er.bydayNum[]. Currently we
384 for (int i = 0; i < er.bydayCount; i++) {
385 if (isSupportedMonthlyByNthDayOfWeek(er.bydayNum[i])) {
394 if (numOfByDayNum > 0 && er.freq != EventRecurrence.MONTHLY) {
400 if (er.bymonthdayCount > 1) {
404 if (er.freq == EventRecurrence.MONTHLY) {
405 if (er.bydayCount > 1) {
408 if (er.bydayCount > 0 && er.bymonthdayCount > 0) {
417 static private void copyEventRecurrenceToModel(final EventRecurrence er,
420 switch (er.freq) {
434 throw new IllegalStateException("freq=" + er.freq);
438 if (er.interval > 0) {
439 model.interval = er.interval;
444 model.endCount = er.count;
450 if (!TextUtils.isEmpty(er.until)) {
456 model.endDate.parse(er.until);
463 throw new IllegalStateException("freq=" + er.freq);
472 if (er.bydayCount > 0) {
474 for (int i = 0; i < er.bydayCount; i++) {
475 int dayOfWeek = EventRecurrence.day2TimeDay(er.byday[i]);
479 isSupportedMonthlyByNthDayOfWeek(er.bydayNum[i])) {
484 model.monthlyByNthDayOfWeek = er.bydayNum[i];
491 if (er.bydayCount != 1) {
504 if (er.bymonthdayCount == 1) {
509 model.monthlyByMonthDay = er.bymonthday[0];
511 } else if (er.bymonthCount > 1) {
519 EventRecurrence er) {
525 er.freq = mFreqModelToEventRecurrence[model.freq];
529 er.interval = 0;
531 er.interval = model.interval;
540 er.until = model.endDate.format2445();
541 er.count = 0;
547 er.count = model.endCount;
548 er.until = null;
549 if (er.count <= 0) {
550 throw new IllegalStateException("count is " + er.count);
554 er.count = 0;
555 er.until = null;
560 er.bydayCount = 0;
561 er.bymonthdayCount = 0;
567 if (er.bymonthday == null || er.bymonthdayCount < 1) {
568 er.bymonthday = new int[1];
570 er.bymonthday[0] = model.monthlyByMonthDay;
571 er.bymonthdayCount = 1;
579 if (er.bydayCount < count || er.byday == null || er.bydayNum == null) {
580 er.byday = new int[count];
581 er.bydayNum = new int[count];
583 er.bydayCount = count;
584 er.byday[0] = EventRecurrence.timeDay2Day(model.monthlyByDayOfWeek);
585 er.bydayNum[0] = model.monthlyByNthDayOfWeek;
596 if (er.bydayCount < count || er.byday == null || er.bydayNum == null) {
597 er.byday = new int[count];
598 er.bydayNum = new int[count];
600 er.bydayCount = count;
604 er.bydayNum[--count] = 0;
605 er.byday[count] = EventRecurrence.timeDay2Day(i);
611 if (!canHandleRecurrenceRule(er)) {
612 throw new IllegalStateException("UI generated recurrence that it can't handle. ER:"
613 + er.toString() + " Model: " + model.toString());