mirror of
https://github.com/etesync/android
synced 2024-11-22 16:08:13 +00:00
Version bump to 1.2
* move ETag requirement from vcard4android to davdroid * more debug info * vcard4android: support for custom labels (X-ABLabel)
This commit is contained in:
parent
41ce609237
commit
19b54748cd
@ -17,17 +17,17 @@ android {
|
|||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 23
|
||||||
|
|
||||||
versionCode 108
|
versionCode 109
|
||||||
|
|
||||||
buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"
|
buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"
|
||||||
}
|
}
|
||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
standard {
|
standard {
|
||||||
versionName "1.1.1.2"
|
versionName "1.2"
|
||||||
}
|
}
|
||||||
gplay {
|
gplay {
|
||||||
versionName "1.1.1.2-gplay"
|
versionName "1.2-gplay"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,11 @@ public class CalendarSyncManager extends SyncManager {
|
|||||||
DavResource remote = bunch[0];
|
DavResource remote = bunch[0];
|
||||||
|
|
||||||
ResponseBody body = remote.get("text/calendar");
|
ResponseBody body = remote.get("text/calendar");
|
||||||
String eTag = ((GetETag)remote.properties.get(GetETag.NAME)).eTag;
|
|
||||||
|
// CalDAV servers MUST return ETag on GET [https://tools.ietf.org/html/rfc4791#section-5.3.4]
|
||||||
|
GetETag eTag = (GetETag)remote.properties.get(GetETag.NAME);
|
||||||
|
if (eTag == null || StringUtils.isEmpty(eTag.eTag))
|
||||||
|
throw new DavException("Received CalDAV GET response without ETag for " + remote.location);
|
||||||
|
|
||||||
Charset charset = Charsets.UTF_8;
|
Charset charset = Charsets.UTF_8;
|
||||||
MediaType contentType = body.contentType();
|
MediaType contentType = body.contentType();
|
||||||
@ -156,7 +160,7 @@ public class CalendarSyncManager extends SyncManager {
|
|||||||
charset = contentType.charset(Charsets.UTF_8);
|
charset = contentType.charset(Charsets.UTF_8);
|
||||||
|
|
||||||
@Cleanup InputStream stream = body.byteStream();
|
@Cleanup InputStream stream = body.byteStream();
|
||||||
processVEvent(remote.fileName(), eTag, stream, charset);
|
processVEvent(remote.fileName(), eTag.eTag, stream, charset);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// multiple contacts, use multi-get
|
// multiple contacts, use multi-get
|
||||||
|
@ -315,7 +315,11 @@ public class ContactsSyncManager extends SyncManager {
|
|||||||
DavResource remote = bunch[0];
|
DavResource remote = bunch[0];
|
||||||
|
|
||||||
ResponseBody body = remote.get("text/vcard;version=4.0, text/vcard;charset=utf-8;q=0.8, text/vcard;q=0.5");
|
ResponseBody body = remote.get("text/vcard;version=4.0, text/vcard;charset=utf-8;q=0.8, text/vcard;q=0.5");
|
||||||
String eTag = ((GetETag) remote.properties.get(GetETag.NAME)).eTag;
|
|
||||||
|
// CardDAV servers MUST return ETag on GET [https://tools.ietf.org/html/rfc6352#section-6.3.2.3]
|
||||||
|
GetETag eTag = (GetETag)remote.properties.get(GetETag.NAME);
|
||||||
|
if (eTag == null || StringUtils.isEmpty(eTag.eTag))
|
||||||
|
throw new DavException("Received CardDAV GET response without ETag for " + remote.location);
|
||||||
|
|
||||||
Charset charset = Charsets.UTF_8;
|
Charset charset = Charsets.UTF_8;
|
||||||
MediaType contentType = body.contentType();
|
MediaType contentType = body.contentType();
|
||||||
@ -323,7 +327,7 @@ public class ContactsSyncManager extends SyncManager {
|
|||||||
charset = contentType.charset(Charsets.UTF_8);
|
charset = contentType.charset(Charsets.UTF_8);
|
||||||
|
|
||||||
@Cleanup InputStream stream = body.byteStream();
|
@Cleanup InputStream stream = body.byteStream();
|
||||||
processVCard(remote.fileName(), eTag, stream, charset, downloader);
|
processVCard(remote.fileName(), eTag.eTag, stream, charset, downloader);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// multiple contacts, use multi-get
|
// multiple contacts, use multi-get
|
||||||
|
@ -130,7 +130,11 @@ public class TasksSyncManager extends SyncManager {
|
|||||||
DavResource remote = bunch[0];
|
DavResource remote = bunch[0];
|
||||||
|
|
||||||
ResponseBody body = remote.get("text/calendar");
|
ResponseBody body = remote.get("text/calendar");
|
||||||
String eTag = ((GetETag)remote.properties.get(GetETag.NAME)).eTag;
|
|
||||||
|
// CalDAV servers MUST return ETag on GET [https://tools.ietf.org/html/rfc4791#section-5.3.4]
|
||||||
|
GetETag eTag = (GetETag)remote.properties.get(GetETag.NAME);
|
||||||
|
if (eTag == null || StringUtils.isEmpty(eTag.eTag))
|
||||||
|
throw new DavException("Received CalDAV GET response without ETag for " + remote.location);
|
||||||
|
|
||||||
Charset charset = Charsets.UTF_8;
|
Charset charset = Charsets.UTF_8;
|
||||||
MediaType contentType = body.contentType();
|
MediaType contentType = body.contentType();
|
||||||
@ -138,7 +142,7 @@ public class TasksSyncManager extends SyncManager {
|
|||||||
charset = contentType.charset(Charsets.UTF_8);
|
charset = contentType.charset(Charsets.UTF_8);
|
||||||
|
|
||||||
@Cleanup InputStream stream = body.byteStream();
|
@Cleanup InputStream stream = body.byteStream();
|
||||||
processVTodo(remote.fileName(), eTag, stream, charset);
|
processVTodo(remote.fileName(), eTag.eTag, stream, charset);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// multiple contacts, use multi-get
|
// multiple contacts, use multi-get
|
||||||
|
@ -209,11 +209,19 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
|
|||||||
for (Account acct : accountManager.getAccountsByType(Constants.ACCOUNT_TYPE))
|
for (Account acct : accountManager.getAccountsByType(Constants.ACCOUNT_TYPE))
|
||||||
try {
|
try {
|
||||||
AccountSettings settings = new AccountSettings(getContext(), acct);
|
AccountSettings settings = new AccountSettings(getContext(), acct);
|
||||||
report.append(
|
report.append("Account: ").append(acct.name).append("\n" +
|
||||||
"Account: ").append(acct.name).append("\n" +
|
" Address book sync. interval: ").append(syncStatus(settings, ContactsContract.AUTHORITY)).append("\n" +
|
||||||
" Address book sync. interval: ").append(syncStatus(settings, ContactsContract.AUTHORITY)).append("\n" +
|
" Calendar sync. interval: ").append(syncStatus(settings, CalendarContract.AUTHORITY)).append("\n" +
|
||||||
" Calendar sync. interval: ").append(syncStatus(settings, CalendarContract.AUTHORITY)).append("\n" +
|
" OpenTasks sync. interval: ").append(syncStatus(settings, "org.dmfs.tasks")).append("\n" +
|
||||||
" OpenTasks sync. interval: ").append(syncStatus(settings, "org.dmfs.tasks")).append("\n");
|
" Preemptive auth: ").append(settings.preemptiveAuth()).append("\n" +
|
||||||
|
" WiFi only: ").append(settings.getSyncWifiOnly());
|
||||||
|
if (settings.getSyncWifiOnlySSID() != null)
|
||||||
|
report.append(", SSID: ").append(settings.getSyncWifiOnlySSID());
|
||||||
|
report.append("\n [CardDAV] Contact group method: ").append(settings.getGroupMethod())
|
||||||
|
.append("\n RFC 6868 encoding: ").append(settings.getVCardRFC6868())
|
||||||
|
.append("\n [CalDAV] Time range (past days): ").append(settings.getTimeRangePastDays())
|
||||||
|
.append("\n Manage calendar colors: ").append(settings.getManageCalendarColors())
|
||||||
|
.append("\n");
|
||||||
} catch(InvalidAccountException e) {
|
} catch(InvalidAccountException e) {
|
||||||
report.append(acct).append(" is invalid (unsupported settings version) or does not exist\n");
|
report.append(acct).append(" is invalid (unsupported settings version) or does not exist\n");
|
||||||
}
|
}
|
||||||
@ -230,7 +238,7 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
|
|||||||
"Android version: ").append(Build.VERSION.RELEASE).append(" (").append(Build.DISPLAY).append(")\n" +
|
"Android version: ").append(Build.VERSION.RELEASE).append(" (").append(Build.DISPLAY).append(")\n" +
|
||||||
"Device: ").append(WordUtils.capitalize(Build.MANUFACTURER)).append(" ").append(Build.MODEL).append(" (").append(Build.DEVICE).append(")\n\n"
|
"Device: ").append(WordUtils.capitalize(Build.MANUFACTURER)).append(" ").append(Build.MODEL).append(" (").append(Build.DEVICE).append(")\n\n"
|
||||||
);
|
);
|
||||||
} catch (Exception ex) {
|
} catch(Exception ex) {
|
||||||
App.log.log(Level.SEVERE, "Couldn't get system details", ex);
|
App.log.log(Level.SEVERE, "Couldn't get system details", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit fde96be29889d29f6ee796cf40f120fba6d50690
|
Subproject commit d5487a1623d7fb7b9b25b41661dec4706bd4001e
|
@ -1 +1 @@
|
|||||||
Subproject commit 61ed667572b0feed32503d912557360371794a59
|
Subproject commit 3a6692f0969afc782358d37b92f291179f72276e
|
Loading…
Reference in New Issue
Block a user