diff options
| author | Andy McFadden <fadden@android.com> | 2011-06-27 13:12:47 -0700 |
|---|---|---|
| committer | Andy McFadden <fadden@android.com> | 2011-06-28 07:43:27 -0700 |
| commit | 84e297238f53f83c9e7de499e711b997d09514e0 (patch) | |
| tree | 226910c0fe5d20d85a9322d0075e97b7a820fb57 /core/java/android/pim | |
| parent | 7654b20e6c517ad7aab04b5361b4821e54424f7f (diff) | |
| download | frameworks_base-84e297238f53f83c9e7de499e711b997d09514e0.zip frameworks_base-84e297238f53f83c9e7de499e711b997d09514e0.tar.gz frameworks_base-84e297238f53f83c9e7de499e711b997d09514e0.tar.bz2 | |
Remove native EventRecurrence parser
Switch over to the new parser.
Bug 4575374
Change-Id: If78d8042fb266182900398f7fc464a048c779966
Diffstat (limited to 'core/java/android/pim')
| -rw-r--r-- | core/java/android/pim/EventRecurrence.java | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/core/java/android/pim/EventRecurrence.java b/core/java/android/pim/EventRecurrence.java index 830f63f..128b697 100644 --- a/core/java/android/pim/EventRecurrence.java +++ b/core/java/android/pim/EventRecurrence.java @@ -155,49 +155,6 @@ public class EventRecurrence { } } - /** - * Parse an iCalendar/RFC2445 recur type according to Section 4.3.10. The string is - * parsed twice, by the old and new parsers, and the results are compared. - * <p> - * TODO: this will go away, and what is now parse2() will simply become parse(). - */ - public void parse(String recur) { - InvalidFormatException newExcep = null; - try { - parse2(recur); - } catch (InvalidFormatException ife) { - newExcep = ife; - } - - boolean oldThrew = false; - try { - EventRecurrence check = new EventRecurrence(); - check.parseNative(recur); - if (newExcep == null) { - // Neither threw, check to see if results match. - if (!equals(check)) { - throw new InvalidFormatException("Recurrence rule parse does not match [" + - recur + "]"); - } - } - } catch (InvalidFormatException ife) { - oldThrew = true; - if (newExcep == null) { - // Old threw, but new didn't. Log a warning, but don't throw. - Log.d(TAG, "NOTE: old parser rejected [" + recur + "]: " + ife.getMessage()); - } - } - - if (newExcep != null) { - if (!oldThrew) { - // New threw, but old didn't. Log a warning and throw the exception. - Log.d(TAG, "NOTE: new parser rejected [" + recur + "]: " + newExcep.getMessage()); - } - throw newExcep; - } - } - - native void parseNative(String recur); public void setStartDate(Time date) { startDate = date; @@ -566,7 +523,7 @@ public class EventRecurrence { * * @param recur The recurrence rule to parse (in un-folded form). */ - void parse2(String recur) { + public void parse(String recur) { /* * From RFC 2445 section 4.3.10: * |
