- Created Barcode Scanner 3.0 beta 1, for Donut and above only.
[zxing.git] / core / src / com / google / zxing / client / result / VCardResultParser.java
index 51182ae..2aa423b 100644 (file)
@@ -32,8 +32,11 @@ final class VCardResultParser extends ResultParser {
   }
 
   public static AddressBookParsedResult parse(Result result) {
+    // Although we should insist on the raw text ending with "END:VCARD", there's no reason
+    // to throw out everything else we parsed just because this was omitted. In fact, Eclair
+    // is doing just that, and we can't parse its contacts without this leniency.
     String rawText = result.getText();
-    if (rawText == null || !rawText.startsWith("BEGIN:VCARD") || !rawText.endsWith("END:VCARD")) {
+    if (rawText == null || !rawText.startsWith("BEGIN:VCARD")) {
       return null;
     }
     String[] names = matchVCardPrefixedField("FN", rawText, true);