1
0
mirror of https://github.com/etesync/android synced 2024-12-23 15:18:14 +00:00

Minor changes

* improved logging
* allow installation to internal storage only (informational change, doesn't do anything actually, closes #160)
This commit is contained in:
rfc2822 2014-01-21 23:10:05 +01:00
parent b3f145f6a8
commit 4073880185
5 changed files with 7 additions and 9 deletions

View File

@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="at.bitfire.davdroid"
android:versionCode="24"
android:versionName="0.5.6-alpha" >
android:versionName="0.5.6-alpha" android:installLocation="internalOnly">
<uses-sdk
android:minSdkVersion="14"

View File

@ -58,6 +58,7 @@ public class SyncManager {
if (!fetchCollection) {
String currentCTag = remote.getCTag(),
lastCTag = local.getCTag();
Log.d(TAG, "Last local CTag = " + lastCTag + "; current remote CTag = " + currentCTag);
if (currentCTag == null || !currentCTag.equals(lastCTag))
fetchCollection = true;
}

View File

@ -42,11 +42,9 @@ public class HttpPropfind extends HttpEntityEnclosingRequestBase {
int depth = 0;
switch (mode) {
case CURRENT_USER_PRINCIPAL:
depth = 0;
propfind.prop.currentUserPrincipal = new DavProp.DavCurrentUserPrincipal();
break;
case HOME_SETS:
depth = 0;
propfind.prop.addressbookHomeSet = new DavProp.DavAddressbookHomeSet();
propfind.prop.calendarHomeSet = new DavProp.DavCalendarHomeSet();
break;
@ -61,7 +59,6 @@ public class HttpPropfind extends HttpEntityEnclosingRequestBase {
propfind.prop.supportedCalendarComponentSet = new DavProp.DavPropSupportedCalendarComponentSet();
break;
case COLLECTION_CTAG:
depth = 0;
propfind.prop.getctag = new DavProp.DavPropGetCTag();
break;
case MEMBERS_ETAG:
@ -79,9 +76,9 @@ public class HttpPropfind extends HttpEntityEnclosingRequestBase {
setHeader("Depth", String.valueOf(depth));
setEntity(new StringEntity(writer.toString(), "UTF-8"));
Log.d(TAG, "Prepared PROPFIND request: " + writer.toString());
Log.d(TAG, "Prepared PROPFIND request for " + uri + ": " + writer.toString());
} catch(Exception ex) {
Log.e(TAG, "Couldn't prepare PROPFIND request", ex);
Log.e(TAG, "Couldn't prepare PROPFIND request for " + uri, ex);
abort();
}
}

View File

@ -31,7 +31,7 @@ public class HttpReport extends HttpEntityEnclosingRequestBase {
try {
setEntity(new StringEntity(entity, "UTF-8"));
Log.d(TAG, "Prepared REPORT request: " + entity);
Log.d(TAG, "Prepared REPORT request for " + uri + ": " + entity);
} catch (UnsupportedEncodingException e) {
Log.e(TAG, e.getMessage());
}

View File

@ -21,7 +21,7 @@ import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import org.apache.http.conn.scheme.LayeredSocketFactory;
import org.apache.http.conn.ssl.StrictHostnameVerifier;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.params.HttpParams;
import android.annotation.TargetApi;
@ -33,7 +33,7 @@ import android.util.Log;
public class TlsSniSocketFactory implements LayeredSocketFactory {
private static final String TAG = "davdroid.SNISocketFactory";
final static HostnameVerifier hostnameVerifier = new StrictHostnameVerifier();
final static HostnameVerifier hostnameVerifier = SSLSocketFactory.STRICT_HOSTNAME_VERIFIER;
// Plain TCP/IP (layer below TLS)