|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.content.SyncManager
class SyncManager
| Nested Class Summary | |
|---|---|
(package private) class |
SyncManager.ActiveSyncContext
|
(package private) class |
SyncManager.SyncAlarmIntentReceiver
|
(package private) class |
SyncManager.SyncHandler
Handles SyncOperation Messages that are posted to the associated HandlerThread. |
(package private) class |
SyncManager.SyncHandlerMessagePayload
|
(package private) static class |
SyncManager.SyncOperation
Value type that represents a sync operation. |
(package private) class |
SyncManager.SyncPollAlarmReceiver
|
(package private) static class |
SyncManager.SyncQueue
|
| Constructor Summary | |
|---|---|
SyncManager(Context context,
boolean factoryTest)
|
|
| Method Summary | |
|---|---|
void |
cancelActiveSync(Uri uri)
Cancel the active sync if it matches the uri. |
void |
clearScheduledSyncOperations(Uri uri)
Remove any scheduled sync operations that match uri. |
protected void |
dump(FileDescriptor fd,
PrintWriter pw)
|
protected void |
dumpSyncHistory(StringBuilder sb)
|
protected void |
dumpSyncState(StringBuilder sb)
|
SyncManager.ActiveSyncContext |
getActiveSyncContext()
|
String |
getSyncingAccount()
|
(package private) void |
maybeRescheduleSync(SyncResult syncResult,
SyncManager.SyncOperation previousSyncOperation)
|
void |
scheduleLocalSync(Uri url)
|
void |
scheduleSync(Uri url,
Bundle extras,
long delay)
Initiate a sync. |
void |
scheduleSyncOperation(SyncManager.SyncOperation syncOperation)
Create and schedule a SyncOperation. |
void |
startSync(Uri url,
Bundle extras)
Initiate a sync for this given URL, or pass null for a full sync. |
void |
updateHeartbeatTime()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SyncManager(Context context,
boolean factoryTest)
| Method Detail |
|---|
public SyncManager.ActiveSyncContext getActiveSyncContext()
public String getSyncingAccount()
public void scheduleSync(Uri url,
Bundle extras,
long delay)
If the ContentResolver.SYNC_EXTRAS_UPLOAD boolean in extras is true then initiate a sync that just checks for local changes to send to the server, otherwise initiate a sync that first gets any changes from the server before sending local changes back to the server.
If a specific provider is being synced (the url is non-null) then the extras can contain SyncAdapter-specific information to control what gets synced (e.g. which specific feed to sync).
You'll start getting callbacks after this.
url - The Uri of a specific provider to be synced, or
null to sync all providers.extras - a Map of SyncAdapter-specific information to control
syncs of a specific provider. Can be null. Is ignored
if the url is null.delay - how many milliseconds in the future to wait before performing this
sync. -1 means to make this the next sync to perform.public void scheduleLocalSync(Uri url)
public void startSync(Uri url,
Bundle extras)
You'll start getting callbacks after this.
url - The Uri of a specific provider to be synced, or
null to sync all providers.extras - a Map of SyncAdapter specific information to control
syncs of a specific provider. Can be null. Is ignoredpublic void updateHeartbeatTime()
public void cancelActiveSync(Uri uri)
uri - If non-null, the active sync is only canceled if it matches the uri.
If null, any active sync is canceled.public void scheduleSyncOperation(SyncManager.SyncOperation syncOperation)
syncOperation - the SyncOperation to schedulepublic void clearScheduledSyncOperations(Uri uri)
uri - If non-null, only operations that match the uri are cleared.
If null, all operations are cleared.
void maybeRescheduleSync(SyncResult syncResult,
SyncManager.SyncOperation previousSyncOperation)
protected void dump(FileDescriptor fd,
PrintWriter pw)
protected void dumpSyncState(StringBuilder sb)
protected void dumpSyncHistory(StringBuilder sb)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||