public static final class SyncStateContract.Helpers extends Object
Constructor and Description |
---|
SyncStateContract.Helpers() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
get(ContentProviderClient provider,
Uri uri,
Account account)
Get the sync state that is associated with the account or null.
|
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)
Creates and returns a ContentProviderOperation that assigns the data array as the
sync state for the given account.
|
static ContentProviderOperation |
newUpdateOperation(Uri uri,
byte[] data)
Creates and returns a ContentProviderOperation that assigns the data array as the
sync state for the given account.
|
static void |
set(ContentProviderClient provider,
Uri uri,
Account account,
byte[] data)
Assigns the data array as the sync state for the given account.
|
static void |
update(ContentProviderClient provider,
Uri uri,
byte[] data) |
public static byte[] get(ContentProviderClient provider, Uri uri, Account account) throws RemoteException
provider
- the ContentProviderClient
that is to be used to communicate
with the ContentProvider
that contains the sync state.uri
- the uri of the sync stateaccount
- the Account
whose sync state should be returnedRemoteException
- if there is a failure communicating with the remote
ContentProvider
public static void set(ContentProviderClient provider, Uri uri, Account account, byte[] data) throws RemoteException
provider
- the ContentProviderClient
that is to be used to communicate
with the ContentProvider
that contains the sync state.uri
- the uri of the sync stateaccount
- the Account
whose sync state should be setdata
- the byte[] that contains the sync stateRemoteException
- if there is a failure communicating with the remote
ContentProvider
public static Uri insert(ContentProviderClient provider, Uri uri, Account account, byte[] data) throws RemoteException
RemoteException
public static void update(ContentProviderClient provider, Uri uri, byte[] data) throws RemoteException
RemoteException
public static Pair<Uri,byte[]> getWithUri(ContentProviderClient provider, Uri uri, Account account) throws RemoteException
RemoteException
public static ContentProviderOperation newSetOperation(Uri uri, Account account, byte[] data)
uri
- the uri of the sync stateaccount
- the Account
whose sync state should be setdata
- the byte[] that contains the sync statepublic static ContentProviderOperation newUpdateOperation(Uri uri, byte[] data)
uri
- the uri of the specific sync state to setdata
- the byte[] that contains the sync state