Home | History | Annotate | Download | only in content

Lines Matching refs:syncResult

42 import android.content.SyncResult;
753 SyncResult syncResult) {
757 msg.obj = new SyncHandlerMessagePayload(syncContext, syncResult);
773 public final SyncResult syncResult;
775 SyncHandlerMessagePayload(ActiveSyncContext syncContext, SyncResult syncResult) {
777 this.syncResult = syncResult;
906 void maybeRescheduleSync(SyncResult syncResult, SyncOperation operation) {
909 Log.d(TAG, "encountered error(s) during the sync: " + syncResult + ", " + operation);
931 && !syncResult.syncAlreadyInProgress) {
936 } else if (syncResult.tooManyRetries) {
939 } else if (syncResult.madeSomeProgress()) {
945 } else if (syncResult.syncAlreadyInProgress) {
956 } else if (syncResult.hasSoftError()) {
1054 public void onFinished(SyncResult result) {
1853 runSyncFinishedOrCanceledLocked(payload.syncResult, payload.activeSyncContext);
1893 SyncResult syncResult = new SyncResult();
1894 syncResult.stats.numIoExceptions++;
1895 runSyncFinishedOrCanceledLocked(syncResult, currentSyncContext);
2379 private void runSyncFinishedOrCanceledLocked(SyncResult syncResult,
2396 if (syncResult != null) {
2399 + syncOperation + ", result " + syncResult);
2402 if (!syncResult.hasError()) {
2404 // TODO: set these correctly when the SyncResult is extended to include it
2409 Log.d(TAG, "failed sync operation " + syncOperation + ", " + syncResult);
2411 if (!syncResult.syncAlreadyInProgress) {
2414 // reschedule the sync if so indicated by the syncResult
2415 maybeRescheduleSync(syncResult, syncOperation);
2417 syncResultToErrorNumber(syncResult));
2418 // TODO: set these correctly when the SyncResult is extended to include it
2423 setDelayUntilTime(syncOperation, syncResult.delayUntil);
2443 if (syncResult != null && syncResult.tooManyDeletions) {
2445 syncOperation.authority, syncResult.stats.numDeletes,
2453 if (syncResult != null && syncResult.fullSyncRequested) {
2471 * Convert the error-containing SyncResult into the Sync.History error number. Since
2472 * the SyncResult may indicate multiple errors at once, this method just returns the
2474 * @param syncResult the SyncResult from which to read
2475 * @return the most "serious" error set in the SyncResult
2476 * @throws IllegalStateException if the SyncResult does not indicate any errors.
2477 * If SyncResult.error() is true then it is safe to call this.
2479 private int syncResultToErrorNumber(SyncResult syncResult) {
2480 if (syncResult.syncAlreadyInProgress)
2482 if (syncResult.stats.numAuthExceptions > 0)
2484 if (syncResult.stats.numIoExceptions > 0)
2486 if (syncResult.stats.numParseExceptions > 0)
2488 if (syncResult.stats.numConflictDetectedExceptions > 0)
2490 if (syncResult.tooManyDeletions)
2492 if (syncResult.tooManyRetries)
2494 if (syncResult.databaseError)
2496 throw new IllegalStateException("we are not in an error state, " + syncResult);