Build 1.0_r1(from source)

android.provider
Class Sync.History

java.lang.Object
  extended by android.provider.Sync.History
All Implemented Interfaces:
BaseColumns, Sync.HistoryColumns, Sync.StatsColumns
Direct Known Subclasses:
Sync.Status
Enclosing class:
Sync

public static class Sync.History
extends Object
implements BaseColumns, Sync.StatsColumns, Sync.HistoryColumns

Provides constants and utility methods to access and use the history table.


Field Summary
static Uri CONTENT_URI
          The content url for this table.
static int ERROR_AUTHENTICATION
           
static int ERROR_CONFLICT
           
static int ERROR_IO
           
static int ERROR_PARSE
           
static int ERROR_SYNC_ALREADY_IN_PROGRESS
           
static int ERROR_TOO_MANY_DELETIONS
           
static int ERROR_TOO_MANY_RETRIES
           
static int EVENT_START
          Enum value for a sync start event.
static int EVENT_STOP
          Enum value for a sync stop event.
static String[] EVENTS
          String names for the sync event types.
static String MESG_CANCELED
           
static String MESG_SUCCESS
           
static int SOURCE_LOCAL
          Enum value for a local-initiated sync.
static int SOURCE_POLL
          Enum value for a poll-based sync (e.g., upon connection to network)
static int SOURCE_SERVER
          Enum value for a server-initiated sync.
static int SOURCE_USER
          Enum value for a user-initiated sync.
static String[] SOURCES
          String names for the sync source types.
 
Fields inherited from interface android.provider.BaseColumns
_COUNT, _ID
 
Fields inherited from interface android.provider.Sync.StatsColumns
ACCOUNT, AUTHORITY
 
Fields inherited from interface android.provider.Sync.HistoryColumns
DOWNSTREAM_ACTIVITY, ELAPSED_TIME, EVENT, EVENT_TIME, MESG, SOURCE, STATS_ID, UPSTREAM_ACTIVITY
 
Method Summary
static boolean hasNewerSyncFinished(ContentResolver contentResolver, String account, String authority, long when)
           
static String mesgToString(String mesg)
           
static Cursor query(ContentResolver contentResolver)
          returns a cursor that queries the sync history in descending event time order
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_URI

public static final Uri CONTENT_URI
The content url for this table.


EVENT_START

public static final int EVENT_START
Enum value for a sync start event.

See Also:
Constant Field Values

EVENT_STOP

public static final int EVENT_STOP
Enum value for a sync stop event.

See Also:
Constant Field Values

EVENTS

public static final String[] EVENTS
String names for the sync event types.


SOURCE_SERVER

public static final int SOURCE_SERVER
Enum value for a server-initiated sync.

See Also:
Constant Field Values

SOURCE_LOCAL

public static final int SOURCE_LOCAL
Enum value for a local-initiated sync.

See Also:
Constant Field Values

SOURCE_POLL

public static final int SOURCE_POLL
Enum value for a poll-based sync (e.g., upon connection to network)

See Also:
Constant Field Values

SOURCE_USER

public static final int SOURCE_USER
Enum value for a user-initiated sync.

See Also:
Constant Field Values

SOURCES

public static final String[] SOURCES
String names for the sync source types.


ERROR_SYNC_ALREADY_IN_PROGRESS

public static final int ERROR_SYNC_ALREADY_IN_PROGRESS
See Also:
Constant Field Values

ERROR_AUTHENTICATION

public static final int ERROR_AUTHENTICATION
See Also:
Constant Field Values

ERROR_IO

public static final int ERROR_IO
See Also:
Constant Field Values

ERROR_PARSE

public static final int ERROR_PARSE
See Also:
Constant Field Values

ERROR_CONFLICT

public static final int ERROR_CONFLICT
See Also:
Constant Field Values

ERROR_TOO_MANY_DELETIONS

public static final int ERROR_TOO_MANY_DELETIONS
See Also:
Constant Field Values

ERROR_TOO_MANY_RETRIES

public static final int ERROR_TOO_MANY_RETRIES
See Also:
Constant Field Values

MESG_SUCCESS

public static final String MESG_SUCCESS
See Also:
Constant Field Values

MESG_CANCELED

public static final String MESG_CANCELED
See Also:
Constant Field Values
Method Detail

mesgToString

public static String mesgToString(String mesg)

query

public static Cursor query(ContentResolver contentResolver)
returns a cursor that queries the sync history in descending event time order

Parameters:
contentResolver - the ContentResolver to use for the query
Returns:
the cursor on the History table

hasNewerSyncFinished

public static boolean hasNewerSyncFinished(ContentResolver contentResolver,
                                           String account,
                                           String authority,
                                           long when)

Build 1.0_r1(from source)

Please submit a feedback, bug or feature