1
0
mirror of https://github.com/etesync/android synced 2024-11-21 23:48:11 +00:00

Version 0.7

* new Settings activity
* Settings: display/change user name, password, preemptive auth.
* Settings: display/change sync. interval for contacts and calendars
* requires permission GET_ACCOUNTS to list accounts in Settings
* requires permission READ_SYNC_SETTINGS to display current sync intervals
* remove obsolete files from res/
* update copyright notices
* version bump to 0.7
This commit is contained in:
Ricki Hirner 2015-03-08 23:30:03 +01:00 committed by Gábor J.Tóth
parent 9b52e51e4e
commit 3a8f17cc2e
195 changed files with 1043 additions and 1935 deletions

View File

@ -1,8 +1,16 @@
/*
* Copyright (c) 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
*/
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "at.bitfire.davdroid"
@ -19,7 +27,8 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
dexOptions {
lintOptions {
abortOnError false
}
packagingOptions {
@ -36,13 +45,10 @@ dependencies {
// Apache Commons
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'
// ical4j for parsing/generating iCalendars
compile 'org.mnode.ical4j:ical4j:1.0.6'
// ez-vcard for parsing/generating VCards
compile('com.googlecode.ez-vcard:ez-vcard:0.9.6') {
// hCard functionality not needed
@ -51,16 +57,13 @@ dependencies {
// jCard functionality not needed
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
}
// dnsjava for querying SRV/TXT records
compile 'dnsjava:dnsjava:2.1.6'
// HttpClient 4.3, Android flavour for WebDAV operations
// we have to use our own patched build of 4.3.5.2-SNAPSHOT to avoid
// https://issues.apache.org/jira/browse/HTTPCLIENT-1591
compile files('lib/httpclient-android-4.3.5.2-davdroid1.jar')
// compile 'org.apache.httpcomponents:httpclient-android:4.3.5.2-SNAPSHOT'
// SimpleXML for parsing and generating WebDAV messages
compile('org.simpleframework:simple-xml:2.7.1') {
exclude group: 'stax', module: 'stax-api'

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 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
-->
<lint>
<issue id="InvalidPackage" severity="ignore" />
<issue id="MissingTranslation" severity="warning" />

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.io.IOException;

View File

@ -1,3 +1,11 @@
/*
* Copyright (c) 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.net.URI;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.net.URI;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import java.io.IOException;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import java.io.IOException;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import java.util.Calendar;

View File

@ -1,3 +1,11 @@
/*
* Copyright (c) 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.syncadapter;
import java.io.IOException;

View File

@ -1,3 +1,11 @@
/*
* Copyright (c) 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.webdav;
import java.io.IOException;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 Ricki Hirner (bitfire web engineering).
* Copyright (c) 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

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import java.io.InputStream;

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<resources>
<string name="app_name">DavdroidTest</string>

View File

@ -1,7 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="at.bitfire.davdroid"
android:versionCode="54" android:versionName="0.6.12"
android:versionCode="55" android:versionName="0.7"
android:installLocation="internalOnly">
<uses-sdk
@ -10,10 +18,12 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<application
@ -22,6 +32,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:process=":sync">
<service
android:name=".syncadapter.AccountAuthenticatorService"
android:exported="false" >
@ -71,6 +82,13 @@
android:name=".syncadapter.AddAccountActivity"
android:excludeFromRecents="true" >
</activity>
<activity
android:name=".syncadapter.SettingsActivity"
android:label="@string/settings_title" >
<intent-filter>
<action android:name="android.intent.action.MANAGE_NETWORK_USAGE" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.lang.reflect.Array;

View File

@ -1,15 +1,15 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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;
public class Constants {
public static final String
APP_VERSION = "0.6.12",
APP_VERSION = "0.7",
ACCOUNT_TYPE = "bitfire.at.davdroid",
WEB_URL_HELP = "https://davdroid.bitfire.at/configuration?pk_campaign=davdroid-app",
WEB_URL_VIEW_LOGS = "https://github.com/bitfireAT/davdroid/wiki/How-to-view-the-logs";

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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 android.app.Activity;
@ -21,6 +21,7 @@ import android.view.View;
import android.widget.TextView;
import at.bitfire.davdroid.syncadapter.AddAccountActivity;
import at.bitfire.davdroid.syncadapter.SettingsActivity;
public class MainActivity extends Activity {
@ -51,8 +52,11 @@ public class MainActivity extends Activity {
public void addAccount(MenuItem item) {
Intent intent = new Intent(this, AddAccountActivity.class);
startActivity(intent);
startActivity(new Intent(this, AddAccountActivity.class));
}
public void showSettings(MenuItem item) {
startActivity(new Intent(this, SettingsActivity.class));
}
public void showSyncSettings(MenuItem item) {

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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 android.util.Log;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import org.apache.http.impl.client.CloseableHttpClient;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import org.apache.http.impl.client.CloseableHttpClient;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import android.util.Log;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import android.content.Context;
@ -67,11 +67,11 @@ public class DavResourceFinder implements Closeable {
Log.i(TAG, "Couldn't find address-book home set", e);
}
if (uriAddressBookHomeSet != null) {
serverInfo.setCardDAV(true);
Log.i(TAG, "Found address-book home set: " + uriAddressBookHomeSet);
WebDavResource homeSetAddressBooks = new WebDavResource(principal, uriAddressBookHomeSet);
if (checkHomesetCapabilities(homeSetAddressBooks, "addressbook")) {
serverInfo.setCardDAV(true);
homeSetAddressBooks.propfind(Mode.CARDDAV_COLLECTIONS);
List<ServerInfo.ResourceInfo> addressBooks = new LinkedList<>();
@ -109,11 +109,11 @@ public class DavResourceFinder implements Closeable {
Log.i(TAG, "Couldn't find calendar home set", e);
}
if (uriCalendarHomeSet != null) {
serverInfo.setCalDAV(true);
Log.i(TAG, "Found calendar home set: " + uriCalendarHomeSet);
WebDavResource homeSetCalendars = new WebDavResource(principal, uriCalendarHomeSet);
if (checkHomesetCapabilities(homeSetCalendars, "calendar-access")) {
serverInfo.setCalDAV(true);
homeSetCalendars.propfind(Mode.CALDAV_COLLECTIONS);
List<ServerInfo.ResourceInfo> calendars = new LinkedList<>();

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import android.text.format.Time;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
public class InvalidResourceException extends Exception {

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import android.accounts.Account;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import android.accounts.Account;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import android.accounts.Account;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
public class LocalStorageException extends Exception {

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
/**

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import android.util.Log;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import java.io.ByteArrayOutputStream;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.resource;
import java.io.Serializable;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.accounts.AbstractAccountAuthenticator;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.accounts.Account;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.accounts.Account;
@ -13,15 +13,18 @@ import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.PeriodicSync;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.CalendarContract;
import android.provider.CalendarContract.Calendars;
import android.provider.ContactsContract;
import android.util.Log;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import at.bitfire.davdroid.resource.ServerInfo;
import ezvcard.VCardVersion;
@ -41,6 +44,8 @@ public class AccountSettings {
KEY_ADDRESSBOOK_CTAG = "addressbook_ctag",
KEY_ADDRESSBOOK_VCARD_VERSION = "addressbook_vcard_version";
public final static long SYNC_INTERVAL_MANUALLY = -1;
Context context;
AccountManager accountManager;
Account account;
@ -79,18 +84,68 @@ public class AccountSettings {
}
// general settings
// authentication settings
public String getUserName() {
return accountManager.getUserData(account, KEY_USERNAME);
}
void setUserName(String userName) { accountManager.setUserData(account, KEY_USERNAME, userName); }
public String getPassword() {
return accountManager.getPassword(account);
}
void setPassword(String password) { accountManager.setPassword(account, password); }
public boolean getPreemptiveAuth() {
return Boolean.parseBoolean(accountManager.getUserData(account, KEY_AUTH_PREEMPTIVE));
public boolean getPreemptiveAuth() { return Boolean.parseBoolean(accountManager.getUserData(account, KEY_AUTH_PREEMPTIVE)); }
void setPreemptiveAuth(boolean preemptive) { accountManager.setUserData(account, KEY_AUTH_PREEMPTIVE, Boolean.toString(preemptive)); }
// sync. settings
public Long getContactsSyncInterval() {
if (ContentResolver.getIsSyncable(account, ContactsContract.AUTHORITY) <= 0)
return null;
if (ContentResolver.getSyncAutomatically(account, ContactsContract.AUTHORITY)) {
List<PeriodicSync> syncs = ContentResolver.getPeriodicSyncs(account, ContactsContract.AUTHORITY);
if (syncs.isEmpty())
return SYNC_INTERVAL_MANUALLY;
else
return syncs.get(0).period;
} else
return SYNC_INTERVAL_MANUALLY;
}
public void setContactsSyncInterval(long seconds) {
if (seconds == SYNC_INTERVAL_MANUALLY) {
ContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, false);
} else {
ContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true);
ContentResolver.addPeriodicSync(account, ContactsContract.AUTHORITY, new Bundle(), seconds);
}
}
public Long getCalendarsSyncInterval() {
if (ContentResolver.getIsSyncable(account, CalendarContract.AUTHORITY) <= 0)
return null;
if (ContentResolver.getSyncAutomatically(account, CalendarContract.AUTHORITY)) {
List<PeriodicSync> syncs = ContentResolver.getPeriodicSyncs(account, CalendarContract.AUTHORITY);
if (syncs.isEmpty())
return SYNC_INTERVAL_MANUALLY;
else
return syncs.get(0).period;
} else
return SYNC_INTERVAL_MANUALLY;
}
public void setCalendarsSyncInterval(long seconds) {
if (seconds == SYNC_INTERVAL_MANUALLY) {
ContentResolver.setSyncAutomatically(account, CalendarContract.AUTHORITY, false);
} else {
ContentResolver.setSyncAutomatically(account, CalendarContract.AUTHORITY, true);
ContentResolver.addPeriodicSync(account, CalendarContract.AUTHORITY, new Bundle(), seconds);
}
}

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.app.Activity;
@ -28,7 +28,7 @@ public class AddAccountActivity extends Activity {
if (savedInstanceState == null) { // first call
getFragmentManager().beginTransaction()
.add(R.id.fragment_container, new LoginTypeFragment(), "login_type")
.add(R.id.right_pane, new LoginTypeFragment(), "login_type")
.commit();
}
}

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.accounts.Account;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.accounts.Account;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.accounts.Account;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.app.DialogFragment;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.app.Fragment;
@ -47,7 +47,7 @@ public class LoginTypeFragment extends Fragment {
case R.id.next:
Fragment loginFragment = btnTypeEmail.isChecked() ? new LoginEmailFragment() : new LoginURLFragment();
getFragmentManager().beginTransaction()
.replace(R.id.fragment_container, loginFragment)
.replace(R.id.right_pane, loginFragment)
.addToBackStack(null)
.commitAllowingStateLoss();
return true;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.app.DialogFragment;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.app.DialogFragment;
@ -27,10 +27,6 @@ import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.cert.CertPathValidatorException;
import java.security.cert.CertificateException;
import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.SSLPeerUnverifiedException;
import at.bitfire.davdroid.R;
import at.bitfire.davdroid.resource.DavResourceFinder;
@ -81,7 +77,7 @@ public class QueryServerDialogFragment extends DialogFragment implements LoaderC
selectCollections.setArguments(arguments);
getFragmentManager().beginTransaction()
.replace(R.id.fragment_container, selectCollections)
.replace(R.id.right_pane, selectCollections)
.addToBackStack(null)
.commitAllowingStateLoss();
}

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.annotation.SuppressLint;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.app.ListFragment;
@ -102,7 +102,7 @@ public class SelectCollectionsFragment extends ListFragment {
accountDetails.setArguments(arguments);
getFragmentManager().beginTransaction()
.replace(R.id.fragment_container, accountDetails)
.replace(R.id.right_pane, accountDetails)
.addToBackStack(null)
.commitAllowingStateLoss();
break;

View File

@ -0,0 +1,117 @@
/*
* Copyright (c) 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.syncadapter;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import at.bitfire.davdroid.R;
public class SettingsAccountFragment extends PreferenceFragment {
final static String KEY_ACCOUNT = "account";
protected Account account;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.account_prefs);
account = getArguments().getParcelable(KEY_ACCOUNT);
readFromAccount();
}
public void readFromAccount() {
final AccountSettings settings = new AccountSettings(getActivity(), account);
final EditTextPreference prefUserName = (EditTextPreference)findPreference("username");
prefUserName.setSummary(settings.getUserName());
prefUserName.setText(settings.getUserName());
prefUserName.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
settings.setUserName((String)newValue);
readFromAccount();
return true;
}
});
final EditTextPreference prefPassword = (EditTextPreference)findPreference("password");
prefPassword.setText(settings.getPassword());
prefPassword.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
settings.setPassword((String)newValue);
readFromAccount();
return true;
}
});
final CheckBoxPreference prefPreemptive = (CheckBoxPreference)findPreference("preemptive");
prefPreemptive.setChecked(settings.getPreemptiveAuth());
prefPreemptive.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
settings.setPreemptiveAuth((Boolean)newValue);
readFromAccount();
return true;
}
});
final ListPreference prefSyncContacts = (ListPreference)findPreference("sync_interval_contacts");
final Long syncIntervalContacts = settings.getContactsSyncInterval();
if (syncIntervalContacts != null) {
prefSyncContacts.setValue(syncIntervalContacts.toString());
if (syncIntervalContacts == AccountSettings.SYNC_INTERVAL_MANUALLY)
prefSyncContacts.setSummary(R.string.settings_sync_summary_manually);
else
prefSyncContacts.setSummary(getString(R.string.settings_sync_summary_periodically, syncIntervalContacts / 60));
prefSyncContacts.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
settings.setContactsSyncInterval(Long.parseLong((String)newValue));
readFromAccount();
return true;
}
});
} else {
prefSyncContacts.setEnabled(false);
prefSyncContacts.setSummary(R.string.settings_sync_summary_not_available);
}
final ListPreference prefSyncCalendars = (ListPreference)findPreference("sync_interval_calendars");
final Long syncIntervalCalendars = settings.getCalendarsSyncInterval();
if (syncIntervalCalendars != null) {
prefSyncCalendars.setValue(syncIntervalCalendars.toString());
if (syncIntervalCalendars == AccountSettings.SYNC_INTERVAL_MANUALLY)
prefSyncCalendars.setSummary(R.string.settings_sync_summary_manually);
else
prefSyncCalendars.setSummary(getString(R.string.settings_sync_summary_periodically, syncIntervalCalendars / 60));
prefSyncCalendars.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
settings.setCalendarsSyncInterval(Long.parseLong((String)newValue));
readFromAccount();
return true;
}
});
} else {
prefSyncCalendars.setEnabled(false);
prefSyncCalendars.setSummary(R.string.settings_sync_summary_not_available);
}
}
}

View File

@ -0,0 +1,73 @@
/*
* Copyright (c) 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.syncadapter;
import android.accounts.Account;
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.util.Log;
import at.bitfire.davdroid.R;
public class SettingsActivity extends Activity {
private final static String KEY_SELECTED_ACCOUNT = "selected_account";
protected Account selectedAccount;
boolean tabletLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
tabletLayout = findViewById(R.id.right_pane) != null;
if (!tabletLayout)
getFragmentManager().beginTransaction()
.add(R.id.content_pane, new SettingsScopeFragment())
.commit();
if (savedInstanceState != null) {
selectedAccount = savedInstanceState.getParcelable(KEY_SELECTED_ACCOUNT);
if (selectedAccount != null)
showAccountSettings(selectedAccount);
}
}
@Override
protected void onSaveInstanceState(Bundle outState) {
outState.putParcelable(KEY_SELECTED_ACCOUNT, selectedAccount);
super.onSaveInstanceState(outState);
}
void showAccountSettings(Account account) {
selectedAccount = account;
FragmentManager fm = getFragmentManager();
Fragment settingsFragment = new SettingsAccountFragment();
Bundle args = new Bundle();
args.putParcelable(SettingsAccountFragment.KEY_ACCOUNT, account);
settingsFragment.setArguments(args);
FragmentTransaction ft = fm
.beginTransaction()
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
if (tabletLayout)
ft .replace(R.id.right_pane, settingsFragment);
else // phone layout
ft .replace(R.id.content_pane, settingsFragment)
.addToBackStack(null);
ft.commit();
}
}

View File

@ -0,0 +1,52 @@
/*
* Copyright (c) 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.syncadapter;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.ListFragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import at.bitfire.davdroid.Constants;
import at.bitfire.davdroid.R;
public class SettingsScopeFragment extends ListFragment {
Account[] accounts;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final AccountManager manager = AccountManager.get(this.getActivity());
accounts = manager.getAccountsByType(Constants.ACCOUNT_TYPE);
final String[] accountNames = new String[accounts.length];
for (int i = 0; i < accounts.length; i++)
accountNames[i] = accounts[i].name;
setListAdapter(new ArrayAdapter<String>(this.getActivity(), android.R.layout.simple_list_item_activated_1, accountNames));
return super.onCreateView(inflater, container, savedInstanceState);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
setEmptyText(getString(R.string.settings_no_accounts));
}
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
l.clearChoices();
((SettingsActivity)getActivity()).showAccountSettings(accounts[position]);
l.setItemChecked(position, true);
}
}

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.content.SyncResult;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.syncadapter;
import android.content.Context;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.simpleframework.xml.Namespace;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.simpleframework.xml.Namespace;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
public class DavException extends Exception {

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.simpleframework.xml.Namespace;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import android.util.Log;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.apache.commons.lang.ArrayUtils;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
public class DavIncapableException extends DavException {

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.simpleframework.xml.Element;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.simpleframework.xml.ElementList;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
public class DavNoContentException extends DavException {

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
public class DavNoMultiStatusException extends DavException {

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.simpleframework.xml.Attribute;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.simpleframework.xml.Element;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.simpleframework.xml.Element;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import android.util.Log;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.simpleframework.xml.Element;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import lombok.Getter;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import android.util.Log;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import android.util.Log;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.apache.http.HttpStatus;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.apache.http.HttpStatus;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import org.apache.http.HttpStatus;

View File

@ -1,10 +1,11 @@
/*
* Copyright (c) 2015 Ricki Hirner (bitfire web engineering).
* Copyright (c) 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.webdav;
import android.os.Build;

View File

@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2014 Ricki Hirner (bitfire web engineering).
/*
* Copyright (c) 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.webdav;
import android.util.Log;

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal"
android:layout_height="match_parent">
<fragment
android:layout_width="@dimen/titles_width"
android:layout_height="match_parent"
android:tag="scope"
android:name="at.bitfire.davdroid.syncadapter.SettingsScopeFragment" />
<FrameLayout
android:id="@+id/right_pane"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

View File

@ -1,3 +1,11 @@
<!--
~ Copyright (c) 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
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/content_pane"
android:layout_width="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal"
android:layout_height="match_parent">
</FrameLayout>

View File

@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_container"
android:id="@+id/right_pane"
android:layout_width="match_parent"
android:layout_height="match_parent" >

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/settings_accounts"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice" />

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item

View File

@ -1,6 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:onClick="addAccount" android:title="@string/setup_add_account" android:showAsAction="always" android:icon="@drawable/ic_action_new_account"/>
<item android:onClick="showSyncSettings" android:title="@string/main_manage_accounts" android:showAsAction="always" android:icon="@drawable/show_sync_settings"/>
<item android:onClick="showWebsite" android:title="@string/davdroid_website" android:showAsAction="ifRoom" android:icon="@drawable/view_website"/>
<item android:onClick="showSettings" android:title="@string/settings_title" android:showAsAction="never" android:icon="@drawable/ic_action_settings"/>
<item android:onClick="showWebsite" android:title="@string/help" android:showAsAction="ifRoom" android:icon="@drawable/view_website"/>
</menu>

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<resources>
<!-- common strings -->

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<resources>
<!-- common strings -->

View File

@ -1,8 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<resources>
<!-- common strings -->
<string name="app_name">DAVdroid</string>
<string name="davdroid_website">DAVdroid-Website</string>
<string name="next">Weiter</string>
<string name="help">Hilfe</string>
@ -103,6 +110,34 @@
<string name="login_password">Passwort:</string>
<string name="settings_title">Einstellungen</string>
<string name="settings_no_accounts">Keine DAVdroid-Konten gefunden</string>
<string name="settings_authentication">Anmeldeinformationen</string>
<string name="settings_username">Benutzername</string>
<string name="settings_enter_username">Benutzername eingeben:</string>
<string name="settings_password">Passwort</string>
<string name="settings_password_summary">Aktualisieren Sie Ihr Passwort gemäß den Server-Einstellungen.</string>
<string name="settings_enter_password">Passwort eingeben:</string>
<string name="settings_preemptive">Präemptive Authentifizierung</string>
<string name="settings_preemptive_on">Anmeldeinformationen werden bei jeder Anfrage gesendet (empfohlen)</string>
<string name="settings_preemptive_off">Anmeldeinformationen werden nur auf Anforderung gesendet</string>
<string name="settings_sync">Synchronisierung</string>
<string name="settings_sync_interval_contacts">Häufigkeit der Kontakte-Synchronisierung</string>
<string name="settings_sync_summary_manually">Nur manuell</string>
<string name="settings_sync_summary_periodically">Alle %d Minuten + sofort bei lokalen Änderungen</string>
<string name="settings_sync_summary_not_available">Nicht verfügbar</string>
<string name="settings_sync_interval_calendars">Häufigkeit der Kalender-Synchronisierung</string>
<string-array name="settings_sync_interval_names">
<item>Nur manuell</item>
<item>Alle 5 Minuten</item>
<item>Alle 10 Minuten</item>
<item>Alle 15 Minuten</item>
<item>Stündlich</item>
<item>Alle 2 Stunden</item>
<item>Alle 4 Stunden</item>
<item>Täglich</item>
</string-array>
<string name="setup_select_collections">DAVdroid: Ordner auswählen</string>
<string name="setup_neither_caldav_nor_carddav">An dieser Adresse konnte kein CalDAV- oder CardDAV-Dienst gefunden werden.</string>
<string name="setup_add_account">Konto hinzufügen</string>

View File

@ -1,4 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 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
-->
<resources>
<string name="app_name">DAVdroid</string>

Some files were not shown because too many files have changed in this diff Show More