| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Enlarge the batch size to reduce db times and save importing time.
Change-Id: Ic5e259abeefb2081d454d7444ff94a456cea7419
CRs-Fixed: 875712
|
| |
|
|
|
|
| |
Add support to generate vcard jar.
Change-Id: I7a7ccac4c5f348b406c64b5f9d745427bb2b18c0
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
PBAP sends over call logs using the vcard format and uses
the X-IRMC-DATETIME property to add in the timestamp of
the calls. The current VCardEntry drops entries that are
not recognized, and since these aren't recongized, they
are dropped.
Given that X- properties can be anything, this change saves
them away in a list that the caller can check and parse if
they desire to do so.
Change-Id: Iece345cc5b1f0ac3b7c8fbc29c78cc4deff11b22
|
| |
|
|
|
| |
Bug: 19551325
Change-Id: Iac18e5015fe78145551d7a60a17446a4a38b3be7
|
| |
|
|
|
|
|
|
| |
Fix handling of multiline data blocks in v3.0 vcards with \r\r\n line
terminators.
Bug:16433675
Change-Id: I77c7c94fa1b13e18e53459e94c3c73ad53b7d8e2
|
| |\
| |
| |
| |
| | |
* commit '2ce674dd8b76a6248463107f8e9d69b054097f7f':
Can't send my wife's vcard between devices
|
| | |\
| | |
| | |
| | |
| | | |
* commit '7f72d2dd76a6b95ff11411a62fa1329ca68edc9d':
Can't send my wife's vcard between devices
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug 13751984
If X-ANDROID-CUSTOM follows a photo's hex data, that line will get included
as part of the photo data and will cause Base64.decode() to throw an
exception. The code that gathers the hex data needs to finish if it sees
X-ANDROID-CUSTOM. Added a test case to test this "bad" vcard.
Change-Id: Ie60a1d09354a9c8a9dab603da01e9c7aff5eb070
(cherry picked from commit a326bcbb665b08f5c20122616452c6e3be8389ac)
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug 13751984
If X-ANDROID-CUSTOM follows a photo's hex data, that line will get included
as part of the photo data and will cause Base64.decode() to throw an
exception. The code that gathers the hex data needs to finish if it sees
X-ANDROID-CUSTOM. Added a test case to test this "bad" vcard.
Change-Id: Ie60a1d09354a9c8a9dab603da01e9c7aff5eb070
|
| |\ \
| |/
|/| |
|
| |/
|
|
| |
Change-Id: I4ca551fc6bb7dac5c7fa4efd89448e0db9c78849
|
| |\
| |
| |
| |
| | |
* commit '7a2ac0405decebde94bb4e3a139d62162e6e15a0':
Store encoding in upper case.
|
| | |
| |
| |
| |
| |
| |
| | |
Instead of checking for up case each time or using equalsIgnoreCase.
Bug: 7292017
Change-Id: I3954a2e0fdb757d157bcf3dff77ed2749a9577d8
|
| |\|
| |
| |
| |
| | |
* commit '8aa2ab8a2f4284cdbc9392e8597ab6d4fd302c50':
Allow importer to handle missing encoding attribute for FN.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
- Removed separators from FN properties.
- Adding fix on importer side since we cannot fix exporters that already exist.
Bug: 7292017
Change-Id: I61c691c24828e63aac1920384e16461da7a03881
|
| |\|
| |
| |
| |
| | |
* commit 'd5a731faf1f749ad7031c13ca5a8cdb516c79b72':
Fix missing encoding attribute on FN field.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
When FN field is built from display name, the encoding attribute is missing.
Created common method to build N and FN fields so they will not be out of
sync in the future.
Bug: 7292017
Change-Id: I7faceb316b639d626a54bdd455df1e748b22face
|
| | |
| |
| |
| |
| |
| |
| |
| | |
- Removed separators from FN properties.
- Adding fix on importer side since we cannot fix exporters that already exist.
Bug: 7292017
Change-Id: I61c691c24828e63aac1920384e16461da7a03881
|
| |/
|
|
|
|
|
|
|
| |
When FN field is built from display name, the encoding attribute is missing.
Created common method to build N and FN fields so they will not be out of
sync in the future.
Bug: 7292017
Change-Id: I7faceb316b639d626a54bdd455df1e748b22face
|
| |
|
|
|
|
|
|
|
|
| |
Multiline addresses are not allowed in vCard 2.1 but it has been encountered
in microsoft mobile vCard. This adds support for this by checking the next
line. If the next line contains a colon, we assume it's a new property.
Otherwise, we assume it's a continuation.
Bug: 5188556
Change-Id: I4607eda901a1d535c759b5026f6702eb47290cb8
|
| |
|
|
|
|
|
|
| |
Base64.decode throws IllegalArgumentException which is not handled
and results in crash reports for users. Switching to VCardException
which should have better UI handling.
Change-Id: I3fa12b8a703c3eed181caade0bfda2271435b377
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Blackberry vcard photo entry is not terminated with standard vcard 2.1
terminator. The vcard code is suppose to handle this irregularity already
but there was a bug where it would not work unless the next entry contained
a ':' right after the property name (i.e. "END:VCARD"). Cases with next
entries such as "TEL;TYPE=CELL:" was missed. Note the ":" is not right after
TEL.
Bug: 6979337
Change-Id: Ifa3dbb377b9da97ef7570c0f8eca8a1cb5e727a9
|
| |
|
|
|
|
|
|
|
|
|
|
| |
vCard's "VOICE" type is the default type used in the format, while
OTHER is the default type on Android. Our exporter treats Android's
OTHER type as vCard's "VOICE", while our importer accepts
the default type "VOICE" as Android's CUSTOM type with "VOICE" label,
which confuses users: when they transfer phone numbers with OTHER type
those numbers become "VOICE" on receiver sides.
Bug: 5600504
Change-Id: Id30d2ca9b67b81798565224b881a734e8ee76516
|
| |
|
|
|
|
| |
Bug: 5348938
Bug: 4177894
Change-Id: Iff9461d8c71c5800b0731c3708867003d75bb395
|
| |
|
|
|
|
|
| |
Needed for when we are building vcards for a profile contact.
Bug: 5300714
Change-Id: Ib4adc54d525ffaffe4d8955f4ba894d1a315099d
|
| |
|
|
|
|
|
|
|
| |
If the contacts have "p"or "w" instead of "," or ";" when some carkits
are receiving them from andro id OS, some catkits cannot parse the
contacts.
Bug: 5178723
Change-Id: I536ca57aff561fb0637448bcddfd53a6ba8b28ef
|
| |
|
|
|
|
|
| |
URI may be extended with additional query parameters
(e.g. user profile).
Change-Id: Ie5ef1ca76709df26609960c12826668afb75ce21
|
| |
|
|
|
|
|
| |
Need I2ef49fde19549da6515b6a7c9a6953fa8834cbaf
Bug: 4066223
Change-Id: I75e87b66268b817b78d9a6f093872ddac9466ff2
|
| |\ |
|
| | |
| |
| |
| |
| | |
Bug: 4066223
Change-Id: I917761014753605ee06f53cbc6499ca9fe9a7956
|
| |\ \ |
|
| | |/
| |
| |
| |
| | |
Bug: 4066223
Change-Id: I712d35582bf054e70ad2406256a57a4ee1381905
|
| |/
|
|
|
| |
Bug: 4066223
Change-Id: I1699dd073a3b9647a5654d3fea4a2963430599da
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) introduce VCardProperty and make use of it everywhere
Previously we had had two structures for it:
VCardParserImpl_V21.PropertyData and VCardEntry#Property.
The former was for holding raw data for property, while
the latter was for holding resultant (encoded) values.
Apparently we can share same structure.
To do so, we need to let VCardInterpreter pass the
structure to interpreter side, instead of splitting them
into smaller pieces by using several propertyXXX() calls.
Thus this change introduces onPropertyCreated(VCardProperty)
in lieu of propertyXXX().
Now vCard parser side is responsible for encoding
Quoted-Printable, BASE64, and several charsets.
Users are still able to do them manually by using
VCardEntry#getRawValue().
2) add better handling for data inside VCardEntry
Now VCardEntry has so many fields that it is harder to
iterate those data, while the iteration itself is common
use case for it. At least three functionalities are
now using iteration: toString(), isEmpty(), and
constructInsertOperations().
This change introduces inner iterator functionality.
VCardEntry.EntryElementIterator allows users to implement
their own iteration logic.
VCardEntry#iterateAllData(VCardEntry.EntryElementIterator)
iterates all data inside VCardEntry and pass them into
the inner iterator.
3) make VCardParser abstract class
VCardParser should provide some utility functionality like
VCardParser#getInstance(), while currently users have to
choose one of inherited classes like VCardParser_V21, which
is hindering encapsulation.
Currently no external library implements VCardParser,
so this change isn't so harmful.
Bug: 4167593
Bug: 4066223
Change-Id: Ic6bb453cf733cf1de356789b36dd90521dceff56
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- remove createOneEntryLegacy()
- remove OneEntryHandler
Should be after
- I3c5a58fef5a404b992a3c17578eeb63518294231
- Ie1eb516a8163febd4438e19df5bc0892726942cb
- Ie21c8966b0bb5b73b3afd18bfe7c142b523413c4
Bug: 4066223
Change-Id: Id623814e8f5961aaf9cf9b4dcc92f75ace401148
|
| |\
| |
| |
| |
| | |
* commit 'a07bb8c56b732e319a3d2d48703d4b3c204ea2cc':
Use correct backReferenceIndex in postal addresses
|
| | |
| |
| |
| |
| |
| |
| | |
DO NOT MERGE.
Bug: 4167593
Change-Id: Ia656336a78e7424d7055a1c22b54fa8d13adc461
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
vCard 2.1 requires to handle nest (or grouping) while our
parser has not supported it well.
One support we have had is ignoring top element when
FLAG_TORELATE_NEST is specified, which isn't appropriate.
e.g.
BEGIN:VCARD
X-VENDER-SPECIFIC-META-INFO:XXXX
...
BEGIN:VCARD
(Actual content)
END:VCARD
END:VCARD
This change lets the vCard lib import nested vCard.
One problem around handling the case above is that, after
having this change, we'll get two vCard elements instead of
one, as the top element isn't ignored on parser level any more,
while we don't want the top-level data. To solve the problem,
this change also makes vCard importer ignore such empty data.
This changes just flattens nested vCard. Caller needs to take
care of grouping/nest case using VCardEntry#getChildren()
if it wants to support grouping feature.
- introduce "children" into VCardEntry, which enables users to
handle nested vCard on their side.
- make vCard parsers accept nest cases.
- make vCard interpreters handle nest cases.
- make VCardEntry ignore empty data during constructing insert
opertions.
- make tests accept nest cases.
- add additional test cases for verifying more details.
- add debug string capability.
- remove codes for performance measurement.
Bug: 4066223
Change-Id: Id8af659c2cc0bb0db59c8de239d9d95e9d440089
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Tiny cleanups are included
Bug: 4066223
Change-Id: I0b121e93ea5c624325d44b8aa6bab42d9a9a24fb
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Apparently forcing users to use OneEntryHandler
every time doesn't make sense. onInit()/onTerminate()
capability can be implemented as users' preferance and
shouldn't be mandatory. Just returning real vCard
Strings would be more preferable.
This breaks current API. We need additional
modifications to three packages.
- Ibaafdf4e0e1e01713b721d216102ae711db7ba74
- Icca2019b10fc84e437efbc2606cd5703b3ea0a5f
- I2667a91d90b1ce985a354a5a37de75bb8156cff8
Bug: 4066223
Change-Id: I91b65f881e1712ecf82c2e119a92bc70c43c623c
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- suppress misc warnings
- stop using VCardException in vCard composer which has been
used only in test context
- add VCardComposer#createOneEntryNew(). I'm planning to replace
this with old VCardComposer#createOneEntry()
I don't understand why we have callback mechanism for this kind of
simple stuff. I could have been better on this.
- add some documentation
- mark initWithRawContacsEntityUri() (introduced recently) as
deprecated. That was not a good idea =(
Bug: 4066223
Change-Id: Ib533a435cac3b4e4fa31527d02b0657fc4bd0377
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- isolate test-related stuffs
- suppress warning
- let constructor accept ContentResolver, which is
useful when test has custom ContentResolver apart from
Context object.
- prohibit multiple init() calls
Change-Id: I0da5af56bf04e8eafbef376668a09002cb62d3f5
|
| |/
|
|
|
|
|
| |
Must be with I4b529a8805b1b0e219c16e93242b102659e8f2e7
Bug: 3143497
Change-Id: I0f90270fb13d13f56b70a07638271b22a065cedd
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- We cannot rely on finilizer ordering: FileOutputStream may be
released before HandlerForOutputStream
- Writer#flush() call in finalizer may lock file system for a long time
(10> secs), which will let the VM assume there is deadlock
- Writer#flush() will be called from Writer#close() so we don't need
to call it explicitly.
- There's a race condition between VCardComposer.finalize()
and FileOutputSteram.finalize() since they may be called
concurrently.
- Use CloseGuard for detecting missing terminate() call.
Change-Id: I1ddcaf2c4564476e81dc67d3ec6ec1c947872a84
|
| |
|
|
|
| |
Bug: 3435697
Change-Id: I89b13097638407cc700f2faafd201cc142e4f9e0
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- remove CharsetUtils stuffs
- remove private APIs in PhoneNumberUtils/TextUtils.
We keep the hidden flag "Data.FOR_EXPORT_ONLY", so this code still
needs access to private API. We don't remove it right now since we
may still need it while we confirmed that the other stuffs are "ok"
to be removed. Some more investigation will be needed in the future
to remove the flag.
Bug: 3143497
Change-Id: I074a7798d2208c3e14a524bd5f307a91ac50f735
|
| |
|
|
| |
Change-Id: I048614aef9ec32cb124d057693dfe6d037a2223e
|
| |
|
|
|
|
|
|
|
| |
Although BASE64 must contain two CRLFs at its end, sometimes
we encounter the case where it doesn't. This change handles
it if possible.
Bug: 3330767
Change-Id: Ibe2be216a25fe1047034be1fdb17bb5d35ed1b5f
|
| |
|
|
|
|
|
|
|
|
| |
Previous implementation uses upper-case strings instead of original
expressions in vCard, so "X-Custom" becomes the custom type "CUSTOM"
Add test case for this fix.
Bug: 3207011
Change-Id: I287fd595a80453e18b2bb57600ea8d0bd8b78ffd
|