Methods Summary |
---|
public android.os.IBinder | getSyncContextBinder()
return (mSyncContext == null) ? null : mSyncContext.asBinder();
|
public void | onFinished(SyncResult result)
try {
if (mSyncContext != null) {
mSyncContext.onFinished(result);
}
} catch (RemoteException e) {
// this should never happen
}
|
public void | setStatusText(java.lang.String message)Call to update the status text for this sync. This internally invokes
{@link #updateHeartbeat}, so it also takes the place of a call to that.
updateHeartbeat();
|
private void | updateHeartbeat()Call to indicate that the SyncAdapter is making progress. E.g., if this SyncAdapter
downloads or sends records to/from the server, this may be called after each record
is downloaded or uploaded.
final long now = SystemClock.elapsedRealtime();
if (now < mLastHeartbeatSendTime + HEARTBEAT_SEND_INTERVAL_IN_MS) return;
try {
mLastHeartbeatSendTime = now;
if (mSyncContext != null) {
mSyncContext.sendHeartbeat();
}
} catch (RemoteException e) {
// this should never happen
}
|