mirror of
https://github.com/etesync/android
synced 2024-11-29 11:28:19 +00:00
Find collections when they're identical with their home set
This commit is contained in:
parent
03c15a6924
commit
fb0552de46
@ -228,7 +228,9 @@ public class DavService extends Service {
|
||||
DavResource dav = new DavResource(httpClient, homeSet);
|
||||
try {
|
||||
dav.propfind(1, CollectionInfo.DAV_PROPERTIES);
|
||||
for (DavResource member : dav.members) {
|
||||
Set<DavResource> selfAndMembers = new HashSet<>(dav.members);
|
||||
selfAndMembers.add(dav);
|
||||
for (DavResource member : selfAndMembers) {
|
||||
CollectionInfo info = CollectionInfo.fromDavResource(member);
|
||||
info.confirmed = true;
|
||||
App.log.log(Level.FINE, "Found collection", info);
|
||||
|
@ -209,8 +209,11 @@ public class DavResourceFinder {
|
||||
// Does the collection refer to address book homesets?
|
||||
AddressbookHomeSet homeSets = (AddressbookHomeSet)dav.properties.get(AddressbookHomeSet.NAME);
|
||||
if (homeSets != null)
|
||||
for (String href : homeSets.hrefs)
|
||||
config.homeSets.add(UrlUtils.withTrailingSlash(dav.location.resolve(href)).uri());
|
||||
for (String href : homeSets.hrefs) {
|
||||
HttpUrl location = UrlUtils.withTrailingSlash(dav.location.resolve(href));
|
||||
log.info("Found addressbook home-set at " + location);
|
||||
config.homeSets.add(location.uri());
|
||||
}
|
||||
}
|
||||
|
||||
protected void rememberIfCalendarOrHomeset(@NonNull DavResource dav, @NonNull Configuration.ServiceInfo config) {
|
||||
|
Loading…
Reference in New Issue
Block a user