public final class

SyncResult

extends Object
implements Parcelable
java.lang.Object
   ↳ android.content.SyncResult

Class Overview

This class is used to store information about the result of a sync

Summary

Constants
SyncResult ALREADY_IN_PROGRESS
Creator<SyncResult> CREATOR
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public boolean databaseError
public boolean fullSyncRequested
public boolean moreRecordsToGet
public boolean partialSyncUnavailable
public final SyncStats stats
public final boolean syncAlreadyInProgress
public boolean tooManyDeletions
public boolean tooManyRetries
Public Constructors
SyncResult()
Public Methods
void clear()
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
boolean hasError()
boolean hasHardError()
boolean hasSoftError()
boolean madeSomeProgress()
String toDebugString()
Generates a debugging string indicating the status.
String toString()
Returns a string containing a concise, human-readable description of this object.
void writeToParcel(Parcel parcel, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final SyncResult ALREADY_IN_PROGRESS

Since: API Level 5

public static final Creator<SyncResult> CREATOR

Since: API Level 5

Fields

public boolean databaseError

Since: API Level 5

public boolean fullSyncRequested

Since: API Level 5

public boolean moreRecordsToGet

Since: API Level 5

public boolean partialSyncUnavailable

Since: API Level 5

public final SyncStats stats

Since: API Level 5

public final boolean syncAlreadyInProgress

Since: API Level 5

public boolean tooManyDeletions

Since: API Level 5

public boolean tooManyRetries

Since: API Level 5

Public Constructors

public SyncResult ()

Since: API Level 5

Public Methods

public void clear ()

Since: API Level 5

public int describeContents ()

Since: API Level 5

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public boolean hasError ()

Since: API Level 5

public boolean hasHardError ()

Since: API Level 5

public boolean hasSoftError ()

Since: API Level 5

public boolean madeSomeProgress ()

Since: API Level 5

public String toDebugString ()

Since: API Level 5

Generates a debugging string indicating the status. The string consist of a sequence of code letter followed by the count. Code letters are f - fullSyncRequested, r - partialSyncUnavailable, X - hardError, e - numParseExceptions, c - numConflictDetectedExceptions, a - numAuthExceptions, D - tooManyDeletions, R - tooManyRetries, b - databaseError, x - softError, l - syncAlreadyInProgress, I - numIoExceptions

Returns
  • debugging string.

public String toString ()

Since: API Level 5

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation simply concatenates the class name, the '@' sign and a hexadecimal representation of the object's hashCode(), that is, it is equivalent to the following expression:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
  • a printable representation of this object.

public void writeToParcel (Parcel parcel, int flags)

Since: API Level 5

Flatten this object in to a Parcel.

Parameters
parcel The Parcel in which the object should be written.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.