to top
Android APIs
public static final class

SyncStateContract.Helpers

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

Summary

Public Constructors

? Examples
SyncStateContract.Helpers()
Public Methods

? Examples
static byte[] get( ContentProviderClient provider, Uri uri, Account account)
Get the sync state that is associated with the account or null.

? Examples
static Pair< Uri, byte[]> getWithUri( ContentProviderClient provider, Uri uri, Account account)

? Examples
static Uri insert( ContentProviderClient provider, Uri uri, Account account, byte[] data)

? Examples
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.

? Examples
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.

? Examples
static void set( ContentProviderClient provider, Uri uri, Account account, byte[] data)
Assigns the data array as the sync state for the given account.

? Examples
static void update( ContentProviderClient provider, Uri uri, byte[] data)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SyncStateContract.Helpers ()

Added in API level 5

Public Methods

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

Added in API level 5

Get the sync state that is associated with the account or null.

Parameters
provider the ContentProviderClient that is to be used to communicate with the ContentProvider that contains the sync state.
uri the uri of the sync state
account the Account whose sync state should be returned
Returns
  • 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

public static Pair<Uri, byte[]> getWithUri (ContentProviderClient provider, Uri uri, Account account)

Added in API level 5

public static Uri insert (ContentProviderClient provider, Uri uri, Account account, byte[] data)

Added in API level 5

public static ContentProviderOperation newSetOperation (Uri uri, Account account, byte[] data)

Added in API level 5

Creates and returns a ContentProviderOperation that assigns the data array as the sync state for the given account.

Parameters
uri the uri of the sync state
account the Account whose sync state should be set
data the byte[] that contains the sync state
Returns
  • the new ContentProviderOperation that assigns the data array as the account's sync state

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

Added in API level 5

Creates and returns a ContentProviderOperation that assigns the data array as the sync state for the given account.

Parameters
uri the uri of the specific sync state to set
data the byte[] that contains the sync state
Returns
  • the new ContentProviderOperation that assigns the data array as the account's sync state

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

Added in API level 5

Assigns the data array as the sync state for the given account.

Parameters
provider the ContentProviderClient that is to be used to communicate with the ContentProvider that contains the sync state.
uri the uri of the sync state
account the Account whose sync state should be set
data the byte[] that contains the sync state
Throws
RemoteException if there is a failure communicating with the remote ContentProvider

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

Added in API level 5
No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.