diff --git a/app/build.gradle b/app/build.gradle index 899893a6..1750a66e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,7 +46,7 @@ dependencies { compile 'commons-lang:commons-lang:2.6' compile 'commons-io:commons-io:2.4' // Lombok for useful @helpers - provided 'org.projectlombok:lombok:1.14.8' + provided 'org.projectlombok:lombok:1.16.4' // ical4j for parsing/generating iCalendars compile 'org.mnode.ical4j:ical4j:1.0.6' // ez-vcard for parsing/generating VCards @@ -58,7 +58,7 @@ dependencies { exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core' } // dnsjava for querying SRV/TXT records - compile 'dnsjava:dnsjava:2.1.6' + compile 'dnsjava:dnsjava:2.1.7' // HttpClient 4.3, Android flavour for WebDAV operations //compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1' compile project(':lib:httpclient-android') diff --git a/app/src/androidTest/java/at/bitfire/davdroid/ArrayUtilsTest.java b/app/src/androidTest/java/at/bitfire/davdroid/ArrayUtilsTest.java index 6fef1eb2..3b927aea 100644 --- a/app/src/androidTest/java/at/bitfire/davdroid/ArrayUtilsTest.java +++ b/app/src/androidTest/java/at/bitfire/davdroid/ArrayUtilsTest.java @@ -1,15 +1,15 @@ /* - * Copyright (c) 2013 – 2015 Ricki Hirner (bitfire web engineering). + * Copyright © 2013 – 2015 Ricki Hirner (bitfire web engineering). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html */ package at.bitfire.davdroid; -import java.util.Arrays; import junit.framework.TestCase; -import at.bitfire.davdroid.ArrayUtils; + +import java.util.Arrays; public class ArrayUtilsTest extends TestCase { diff --git a/app/src/androidTest/java/at/bitfire/davdroid/TestConstants.java b/app/src/androidTest/java/at/bitfire/davdroid/TestConstants.java index bb2f4fdb..4ef7a5a1 100644 --- a/app/src/androidTest/java/at/bitfire/davdroid/TestConstants.java +++ b/app/src/androidTest/java/at/bitfire/davdroid/TestConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 – 2015 Ricki Hirner (bitfire web engineering). + * Copyright © 2013 – 2015 Ricki Hirner (bitfire web engineering). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at @@ -8,11 +8,11 @@ package at.bitfire.davdroid; +import android.util.Log; + import java.net.URI; import java.net.URISyntaxException; -import android.util.Log; - public class TestConstants { public static final String ROBOHYDRA_BASE = "http://192.168.0.11:3000/"; diff --git a/app/src/androidTest/java/at/bitfire/davdroid/URLUtilsTest.java b/app/src/androidTest/java/at/bitfire/davdroid/URLUtilsTest.java index 2ee94a21..1fe00b37 100644 --- a/app/src/androidTest/java/at/bitfire/davdroid/URLUtilsTest.java +++ b/app/src/androidTest/java/at/bitfire/davdroid/URLUtilsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 – 2015 Ricki Hirner (bitfire web engineering). + * Copyright © 2013 – 2015 Ricki Hirner (bitfire web engineering). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at @@ -7,10 +7,9 @@ */ package at.bitfire.davdroid; -import java.net.URI; - import junit.framework.TestCase; -import at.bitfire.davdroid.URIUtils; + +import java.net.URI; public class URLUtilsTest extends TestCase { diff --git a/app/src/androidTest/java/at/bitfire/davdroid/resource/ContactTest.java b/app/src/androidTest/java/at/bitfire/davdroid/resource/ContactTest.java index 6bfdb96b..041a7209 100644 --- a/app/src/androidTest/java/at/bitfire/davdroid/resource/ContactTest.java +++ b/app/src/androidTest/java/at/bitfire/davdroid/resource/ContactTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 – 2015 Ricki Hirner (bitfire web engineering). + * Copyright © 2013 – 2015 Ricki Hirner (bitfire web engineering). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at diff --git a/app/src/androidTest/java/at/bitfire/davdroid/resource/EventTest.java b/app/src/androidTest/java/at/bitfire/davdroid/resource/EventTest.java index eb41b8b7..68d184fa 100644 --- a/app/src/androidTest/java/at/bitfire/davdroid/resource/EventTest.java +++ b/app/src/androidTest/java/at/bitfire/davdroid/resource/EventTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 – 2015 Ricki Hirner (bitfire web engineering). + * Copyright © 2013 – 2015 Ricki Hirner (bitfire web engineering). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at diff --git a/app/src/androidTest/java/at/bitfire/davdroid/resource/LocalCalendarTest.java b/app/src/androidTest/java/at/bitfire/davdroid/resource/LocalCalendarTest.java index e44afb6c..65d1be86 100644 --- a/app/src/androidTest/java/at/bitfire/davdroid/resource/LocalCalendarTest.java +++ b/app/src/androidTest/java/at/bitfire/davdroid/resource/LocalCalendarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 – 2015 Ricki Hirner (bitfire web engineering). + * Copyright © 2013 – 2015 Ricki Hirner (bitfire web engineering). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at @@ -11,7 +11,6 @@ import android.Manifest; import android.accounts.Account; import android.annotation.TargetApi; import android.content.ContentProviderClient; -import android.content.ContentProviderOperation; import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; @@ -20,10 +19,8 @@ import android.net.Uri; import android.os.Build; import android.os.RemoteException; import android.provider.CalendarContract; -import android.provider.CalendarContract.Attendees; import android.provider.CalendarContract.Calendars; import android.provider.CalendarContract.Events; -import android.provider.CalendarContract.Reminders; import android.test.InstrumentationTestCase; import android.util.Log; @@ -43,10 +40,7 @@ import java.text.ParseException; import java.util.ArrayList; import java.util.Calendar; import java.util.List; -import java.util.SimpleTimeZone; -import at.bitfire.davdroid.Constants; -import at.bitfire.davdroid.webdav.DavProp; import lombok.Cleanup; public class LocalCalendarTest extends InstrumentationTestCase { diff --git a/app/src/androidTest/java/at/bitfire/davdroid/syncadapter/DavResourceFinderTest.java b/app/src/androidTest/java/at/bitfire/davdroid/syncadapter/DavResourceFinderTest.java index 30492125..4abde89c 100644 --- a/app/src/androidTest/java/at/bitfire/davdroid/syncadapter/DavResourceFinderTest.java +++ b/app/src/androidTest/java/at/bitfire/davdroid/syncadapter/DavResourceFinderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 – 2015 Ricki Hirner (bitfire web engineering). + * Copyright © 2013 – 2015 Ricki Hirner (bitfire web engineering). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at @@ -8,15 +8,16 @@ package at.bitfire.davdroid.syncadapter; +import android.test.InstrumentationTestCase; + import java.io.IOException; import java.net.URI; import java.util.List; -import android.test.InstrumentationTestCase; +import at.bitfire.davdroid.TestConstants; import at.bitfire.davdroid.resource.DavResourceFinder; import at.bitfire.davdroid.resource.ServerInfo; import at.bitfire.davdroid.resource.ServerInfo.ResourceInfo; -import at.bitfire.davdroid.TestConstants; import ezvcard.VCardVersion; public class DavResourceFinderTest extends InstrumentationTestCase { diff --git a/app/src/androidTest/java/at/bitfire/davdroid/webdav/DavRedirectStrategyTest.java b/app/src/androidTest/java/at/bitfire/davdroid/webdav/DavRedirectStrategyTest.java index 3112a9fb..aa8000c7 100644 --- a/app/src/androidTest/java/at/bitfire/davdroid/webdav/DavRedirectStrategyTest.java +++ b/app/src/androidTest/java/at/bitfire/davdroid/webdav/DavRedirectStrategyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 – 2015 Ricki Hirner (bitfire web engineering). + * Copyright © 2013 – 2015 Ricki Hirner (bitfire web engineering). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at @@ -8,10 +8,8 @@ package at.bitfire.davdroid.webdav; -import java.io.IOException; - import junit.framework.TestCase; -import at.bitfire.davdroid.TestConstants; + import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpOptions; import org.apache.http.client.methods.HttpUriRequest; @@ -20,6 +18,10 @@ import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.protocol.HttpContext; +import java.io.IOException; + +import at.bitfire.davdroid.TestConstants; + public class DavRedirectStrategyTest extends TestCase { CloseableHttpClient httpClient; diff --git a/app/src/androidTest/java/at/bitfire/davdroid/webdav/TlsSniSocketFactoryTest.java b/app/src/androidTest/java/at/bitfire/davdroid/webdav/TlsSniSocketFactoryTest.java index 6c50ce0d..d308fc11 100644 --- a/app/src/androidTest/java/at/bitfire/davdroid/webdav/TlsSniSocketFactoryTest.java +++ b/app/src/androidTest/java/at/bitfire/davdroid/webdav/TlsSniSocketFactoryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 – 2015 Ricki Hirner (bitfire web engineering). + * Copyright © 2013 – 2015 Ricki Hirner (bitfire web engineering). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at @@ -8,24 +8,22 @@ package at.bitfire.davdroid.webdav; -import java.io.IOException; -import java.net.InetSocketAddress; -import java.net.Socket; -import java.net.SocketAddress; -import java.security.cert.CertPathValidatorException; - -import javax.net.ssl.SSLException; -import javax.net.ssl.SSLHandshakeException; -import javax.net.ssl.SSLPeerUnverifiedException; -import javax.net.ssl.SSLSocket; - import android.util.Log; + import junit.framework.TestCase; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.http.HttpHost; +import java.io.IOException; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.security.cert.CertPathValidatorException; + +import javax.net.ssl.SSLException; +import javax.net.ssl.SSLHandshakeException; + import lombok.Cleanup; public class TlsSniSocketFactoryTest extends TestCase { diff --git a/app/src/androidTest/java/at/bitfire/davdroid/webdav/WebDavResourceTest.java b/app/src/androidTest/java/at/bitfire/davdroid/webdav/WebDavResourceTest.java index 051ac39f..1ab93ee9 100644 --- a/app/src/androidTest/java/at/bitfire/davdroid/webdav/WebDavResourceTest.java +++ b/app/src/androidTest/java/at/bitfire/davdroid/webdav/WebDavResourceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 – 2015 Ricki Hirner (bitfire web engineering). + * Copyright © 2013 – 2015 Ricki Hirner (bitfire web engineering). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at @@ -7,24 +7,23 @@ */ package at.bitfire.davdroid.webdav; +import android.content.res.AssetManager; +import android.test.InstrumentationTestCase; + +import org.apache.commons.io.IOUtils; +import org.apache.http.impl.client.CloseableHttpClient; + import java.io.InputStream; import java.net.URI; import java.util.Arrays; -import java.util.List; import javax.net.ssl.SSLPeerUnverifiedException; -import ezvcard.VCardVersion; -import lombok.Cleanup; - -import org.apache.commons.io.IOUtils; - -import android.content.res.AssetManager; -import android.test.InstrumentationTestCase; import at.bitfire.davdroid.TestConstants; import at.bitfire.davdroid.webdav.HttpPropfind.Mode; import at.bitfire.davdroid.webdav.WebDavResource.PutMode; -import org.apache.http.impl.client.CloseableHttpClient; +import ezvcard.VCardVersion; +import lombok.Cleanup; // tests require running robohydra! diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f92d8389..21e14846 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -9,7 +9,7 @@