|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAbstractThreadedSyncAdapter
com.vodafone360.people.service.SyncAdapter
public class SyncAdapter
SyncAdapter implementation which basically just ties in with the old Contacts Sync Engine code for the moment and waits for the sync to be finished. In the future we may want to improve this, particularly if the sync is actually be done in this thread which would also enable disable sync altogether.
Constructor Summary | |
---|---|
SyncAdapter(Context context,
boolean autoInitialize)
|
Method Summary | |
---|---|
void |
onContactSyncStateChange(ContactSyncEngine.Mode mode,
ContactSyncEngine.State oldState,
ContactSyncEngine.State newState)
Called when the contact sync engine changes state or mode |
void |
onPerformSync(Account account,
Bundle extras,
java.lang.String authority,
ContentProviderClient provider,
SyncResult syncResult)
|
void |
onProgressEvent(ContactSyncEngine.State currentState,
int percent)
Called to update interested parties on contact sync progress. |
void |
onSyncComplete(ServiceStatus status)
Called a contact sync finishes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SyncAdapter(Context context, boolean autoInitialize)
Method Detail |
---|
public void onPerformSync(Account account, Bundle extras, java.lang.String authority, ContentProviderClient provider, SyncResult syncResult)
public void onContactSyncStateChange(ContactSyncEngine.Mode mode, ContactSyncEngine.State oldState, ContactSyncEngine.State newState)
ContactSyncEngine.IContactSyncObserver
onContactSyncStateChange
in interface ContactSyncEngine.IContactSyncObserver
mode
- Current modeoldState
- Previous statenewState
- New stateIContactSyncObserver#onContactSyncStateChange(Mode, State, State)
public void onProgressEvent(ContactSyncEngine.State currentState, int percent)
ContactSyncEngine.IContactSyncObserver
onProgressEvent
in interface ContactSyncEngine.IContactSyncObserver
currentState
- What the contact sync engine is currently doingpercent
- Percentage complete for the current taskIContactSyncObserver#onProgressEvent(State, int)
public void onSyncComplete(ServiceStatus status)
ContactSyncEngine.IContactSyncObserver
onSyncComplete
in interface ContactSyncEngine.IContactSyncObserver
status
- SUCCESS if the sync was successful, a suitable error
code otherwise.ContactSyncEngine.IContactSyncObserver.onSyncComplete(ServiceStatus)
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc