Most visited

Recently visited

Added in API level 5

SyncStateContract.Helpers

public static final class SyncStateContract.Helpers
extends Object

java.lang.Object
    android.provider.SyncStateContract.Helpers


摘要(Summary)

Public constructors

SyncStateContract.Helpers()

公共方法(Public methods)

static byte[] get(ContentProviderClient provider, Uri uri, Account account)

获取与该帐户关联的同步状态或为空。

static Pair<Uri, byte[]> getWithUri(ContentProviderClient provider, Uri uri, Account account)
static Uri insert(ContentProviderClient provider, Uri uri, Account account, byte[] data)
static ContentProviderOperation newSetOperation(Uri uri, Account account, byte[] data)

创建并返回一个ContentProviderOperation,它将数据数组分配为给定帐户的同步状态。

static ContentProviderOperation newUpdateOperation(Uri uri, byte[] data)

创建并返回一个ContentProviderOperation,它将数据数组分配为给定帐户的同步状态。

static void set(ContentProviderClient provider, Uri uri, Account account, byte[] data)

将数据数组指定为给定帐户的同步状态。

static void update(ContentProviderClient provider, Uri uri, byte[] data)

继承方法(Inherited methods)

From class java.lang.Object

Public constructors

SyncStateContract.Helpers

Added in API level 5
SyncStateContract.Helpers ()

公共方法(Public methods)

get

Added in API level 5
byte[] get (ContentProviderClient provider, 
                Uri uri, 
                Account account)

获取与该帐户关联的同步状态或为空。

参数(Parameters)
provider ContentProviderClient: the ContentProviderClient that is to be used to communicate with the ContentProvider that contains the sync state.
uri Uri: the uri of the sync state
account Account: the Account whose sync state should be returned
返回(Returns)
byte[] the sync state or null if there is no sync state associated with the account
抛出异常(Throws)
RemoteException if there is a failure communicating with the remote ContentProvider

getWithUri

Added in API level 5
Pair<Uri, byte[]> getWithUri (ContentProviderClient provider, 
                Uri uri, 
                Account account)

参数(Parameters)
provider ContentProviderClient
uri Uri
account Account
返回(Returns)
Pair<Uri, byte[]>
抛出异常(Throws)
RemoteException

insert

Added in API level 5
Uri insert (ContentProviderClient provider, 
                Uri uri, 
                Account account, 
                byte[] data)

参数(Parameters)
provider ContentProviderClient
uri Uri
account Account
data byte
返回(Returns)
Uri
抛出异常(Throws)
RemoteException

newSetOperation

Added in API level 5
ContentProviderOperation newSetOperation (Uri uri, 
                Account account, 
                byte[] data)

创建并返回一个ContentProviderOperation,它将数据数组分配为给定帐户的同步状态。

参数(Parameters)
uri Uri: the uri of the sync state
account Account: the Account whose sync state should be set
data byte: the byte[] that contains the sync state
返回(Returns)
ContentProviderOperation the new ContentProviderOperation that assigns the data array as the account's sync state

newUpdateOperation

Added in API level 5
ContentProviderOperation newUpdateOperation (Uri uri, 
                byte[] data)

创建并返回一个ContentProviderOperation,它将数据数组分配为给定帐户的同步状态。

参数(Parameters)
uri Uri: the uri of the specific sync state to set
data byte: the byte[] that contains the sync state
返回(Returns)
ContentProviderOperation the new ContentProviderOperation that assigns the data array as the account's sync state

set

Added in API level 5
void set (ContentProviderClient provider, 
                Uri uri, 
                Account account, 
                byte[] data)

将数据数组指定为给定帐户的同步状态。

参数(Parameters)
provider ContentProviderClient: the ContentProviderClient that is to be used to communicate with the ContentProvider that contains the sync state.
uri Uri: the uri of the sync state
account Account: the Account whose sync state should be set
data byte: the byte[] that contains the sync state
抛出异常(Throws)
RemoteException if there is a failure communicating with the remote ContentProvider

update

Added in API level 5
void update (ContentProviderClient provider, 
                Uri uri, 
                byte[] data)

参数(Parameters)
provider ContentProviderClient
uri Uri
data byte
抛出异常(Throws)
RemoteException

Hooray!