1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// Copyright 2007 The Android Open Source Project
package android.content;
import android.database.Cursor;
import android.net.Uri;
/**
* ContentProvider that tracks the sync data and overall sync
* history on the device.
*
* @hide
*/
public class SyncProvider extends ContentProvider {
public SyncProvider() {
}
private SyncStorageEngine mSyncStorageEngine;
@Override
public boolean onCreate() {
mSyncStorageEngine = SyncStorageEngine.getSingleton();
return true;
}
@Override
public Cursor query(Uri url, String[] projectionIn,
String selection, String[] selectionArgs, String sort) {
return mSyncStorageEngine.query(url, projectionIn, selection, selectionArgs, sort);
}
@Override
public Uri insert(Uri url, ContentValues initialValues) {
return mSyncStorageEngine.insert(true /* the caller is the provider */,
url, initialValues);
}
@Override
public int delete(Uri url, String where, String[] whereArgs) {
return mSyncStorageEngine.delete(true /* the caller is the provider */,
url, where, whereArgs);
}
@Override
public int update(Uri url, ContentValues initialValues, String where, String[] whereArgs) {
return mSyncStorageEngine.update(true /* the caller is the provider */,
url, initialValues, where, whereArgs);
}
@Override
public String getType(Uri url) {
return mSyncStorageEngine.getType(url);
}
}
|