mirror of
https://github.com/etesync/android
synced 2024-11-14 03:39:52 +00:00
Minor bug fixes
* work-around for crash when remote ETag is empty (shouldn't happen but happens sometimes) * fetch multiple contact URLs (not only the first one) from contacts provider (fixes #150)
This commit is contained in:
parent
4f1488ece5
commit
b3f145f6a8
@ -439,7 +439,7 @@ public class LocalAddressBook extends LocalCollection<Contact> {
|
||||
@Cleanup Cursor cursor = providerClient.query(dataURI(), new String[] { Website.URL },
|
||||
Website.RAW_CONTACT_ID + "=? AND " + Data.MIMETYPE + "=?",
|
||||
new String[] { String.valueOf(c.getLocalID()), Website.CONTENT_ITEM_TYPE }, null);
|
||||
if (cursor != null && cursor.moveToNext())
|
||||
while (cursor != null && cursor.moveToNext())
|
||||
c.getURLs().add(cursor.getString(0));
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public class SyncManager {
|
||||
for (Resource remoteResource : remoteResources) {
|
||||
try {
|
||||
Resource localResource = local.findByRemoteName(remoteResource.getName(), false);
|
||||
if (!remoteResource.getETag().equals(localResource.getETag()))
|
||||
if (localResource.getETag() == null || localResource.getETag() != remoteResource.getETag())
|
||||
remotelyUpdated.add(remoteResource);
|
||||
} catch(RecordNotFoundException e) {
|
||||
remotelyAdded.add(remoteResource);
|
||||
|
Loading…
Reference in New Issue
Block a user