SyncStateContract.Helpers
public
static
final
class
SyncStateContract.Helpers
extends Object
Summary
Public methods |
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)
|
Inherited methods |
From
class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long millis, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long millis)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
|
Public constructors
SyncStateContract.Helpers
SyncStateContract.Helpers ()
Public methods
get
byte[] get (ContentProviderClient provider,
Uri uri,
Account account)
Get the sync state that is associated with the account or null.
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 |
newSetOperation
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.
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
ContentProviderOperation newUpdateOperation (Uri uri,
byte[] data)
Creates and returns a ContentProviderOperation that assigns the data array as the
sync state for the given account.
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
void set (ContentProviderClient provider,
Uri uri,
Account account,
byte[] data)
Assigns the data array as the sync state for the given 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 set |
data |
byte :
the byte[] that contains the sync state |
update
void update (ContentProviderClient provider,
Uri uri,
byte[] data)
Parameters |
provider |
ContentProviderClient
|
uri |
Uri
|
data |
byte
|