<action android:name="android.content.SyncAdapter"/>
</intent-filter>
<meta-data
- android:resource="@xml/syncadapter" android:name="android.content.SyncAdapter"/>
+ android:name="android.content.SyncAdapter"
+ android:resource="@xml/syncadapter_files"/>
</service>
- <provider android:name="cp" android:authorities="org.owncloud" android:enabled="true" android:syncable="true" android:exported="false" android:label="@string/sync_string_files"></provider>
+ <provider android:name="cp" android:enabled="true" android:syncable="true" android:exported="false" android:label="@string/sync_string_files" android:authorities="org.owncloud.files"></provider>
<activity android:name=".authenticator.AuthenticatorActivity"></activity>
- <provider android:label="@string/sync_string_contacts" android:name="cp2" android:syncable="true" android:authorities="org.owncloud" android:enabled="true" android:exported="false"></provider>
+ <provider android:label="@string/sync_string_contacts" android:name="cp2" android:syncable="true" android:enabled="true" android:exported="false" android:authorities="org.owncloud.contacts"></provider>
+ <service android:name=".syncadapter.ContactSyncService" android:exported="true">
+ <intent-filter>
+ <action android:name="android.content.SyncAdapter"></action>
+ </intent-filter>
+ <meta-data android:resource="@xml/syncadapter_contacts" android:name="android.content.SyncAdapter"></meta-data>
+ </service>
</application>
</manifest>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
-<!-- The attributes in this XML file provide configuration information -->
-<!-- for the SyncAdapter. -->
-
-<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
- android:contentAuthority="org.owncloud"
- android:accountType="owncloud"
- android:supportsUploading="true"
-/>
private static final UriMatcher mUriMatcher;
static {
mUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
- mUriMatcher.addURI(ProviderMeta.AUTHORITY, "/", ROOT_DIRECTORY);
- mUriMatcher.addURI(ProviderMeta.AUTHORITY, "file/", SINGLE_FILE);
- mUriMatcher.addURI(ProviderMeta.AUTHORITY, "file/#", SINGLE_FILE);
- mUriMatcher.addURI(ProviderMeta.AUTHORITY, "dir/#", DIRECTORY);
+ mUriMatcher.addURI(ProviderMeta.AUTHORITY_FILES, "/", ROOT_DIRECTORY);
+ mUriMatcher.addURI(ProviderMeta.AUTHORITY_FILES, "file/", SINGLE_FILE);
+ mUriMatcher.addURI(ProviderMeta.AUTHORITY_FILES, "file/#", SINGLE_FILE);
+ mUriMatcher.addURI(ProviderMeta.AUTHORITY_FILES, "dir/#", DIRECTORY);
}
private static final String TAG = "OC_ContentProvider";
public class ProviderMeta {
- public static final String AUTHORITY = "org.owncloud";
+ public static final String AUTHORITY_FILES = "org.owncloud.files";
public static final String DB_FILE = "owncloud.db";
public static final String DB_NAME = "filelist";
public static final int DB_VERSION = 1;
static public class ProviderTableMeta implements BaseColumns {
public static final String DB_NAME = "filelist";
public static final Uri CONTENT_URI =
- Uri.parse("content://" + AUTHORITY + "/");
+ Uri.parse("content://" + AUTHORITY_FILES + "/");
public static final Uri CONTENT_URI_FILE =
- Uri.parse("content://" + AUTHORITY + "/file");
+ Uri.parse("content://" + AUTHORITY_FILES + "/file");
public static final Uri CONTENT_URI_DIR =
- Uri.parse("content://" + AUTHORITY + "/dir");
+ Uri.parse("content://" + AUTHORITY_FILES + "/dir");
public static final String CONTENT_TYPE =
"vnd.android.cursor.dir/vnd.owncloud.file";