Home | History | Annotate | Download | only in content

Lines Matching defs:syncResult

43 import android.content.SyncResult;
782 SyncResult syncResult) {
786 msg.obj = new SyncHandlerMessagePayload(syncContext, syncResult);
802 public final SyncResult syncResult;
804 SyncHandlerMessagePayload(ActiveSyncContext syncContext, SyncResult syncResult) {
806 this.syncResult = syncResult;
936 void maybeRescheduleSync(SyncResult syncResult, SyncOperation operation) {
939 Log.d(TAG, "encountered error(s) during the sync: " + syncResult + ", " + operation);
961 && !syncResult.syncAlreadyInProgress) {
966 } else if (syncResult.tooManyRetries) {
969 } else if (syncResult.madeSomeProgress()) {
975 } else if (syncResult.syncAlreadyInProgress) {
988 } else if (syncResult.hasSoftError()) {
1087 public void onFinished(SyncResult result) {
1905 runSyncFinishedOrCanceledLocked(payload.syncResult, payload.activeSyncContext);
1945 SyncResult syncResult = new SyncResult();
1946 syncResult.stats.numIoExceptions++;
1947 runSyncFinishedOrCanceledLocked(syncResult, currentSyncContext);
2492 private void runSyncFinishedOrCanceledLocked(SyncResult syncResult,
2509 if (syncResult != null) {
2512 + syncOperation + ", result " + syncResult);
2515 if (!syncResult.hasError()) {
2517 // TODO: set these correctly when the SyncResult is extended to include it
2522 Log.d(TAG, "failed sync operation " + syncOperation + ", " + syncResult);
2524 if (!syncResult.syncAlreadyInProgress) {
2527 // reschedule the sync if so indicated by the syncResult
2528 maybeRescheduleSync(syncResult, syncOperation);
2530 syncResultToErrorNumber(syncResult));
2531 // TODO: set these correctly when the SyncResult is extended to include it
2536 setDelayUntilTime(syncOperation, syncResult.delayUntil);
2556 if (syncResult != null && syncResult.tooManyDeletions) {
2558 syncOperation.authority, syncResult.stats.numDeletes,
2566 if (syncResult != null && syncResult.fullSyncRequested) {
2586 * Convert the error-containing SyncResult into the Sync.History error number. Since
2587 * the SyncResult may indicate multiple errors at once, this method just returns the
2589 * @param syncResult the SyncResult from which to read
2590 * @return the most "serious" error set in the SyncResult
2591 * @throws IllegalStateException if the SyncResult does not indicate any errors.
2592 * If SyncResult.error() is true then it is safe to call this.
2594 private int syncResultToErrorNumber(SyncResult syncResult) {
2595 if (syncResult.syncAlreadyInProgress)
2597 if (syncResult.stats.numAuthExceptions > 0)
2599 if (syncResult.stats.numIoExceptions > 0)
2601 if (syncResult.stats.numParseExceptions > 0)
2603 if (syncResult.stats.numConflictDetectedExceptions > 0)
2605 if (syncResult.tooManyDeletions)
2607 if (syncResult.tooManyRetries)
2609 if (syncResult.databaseError)
2611 throw new IllegalStateException("we are not in an error state, " + syncResult);