public class SyncOperation extends Object
Modifier and Type | Field and Description |
---|---|
boolean |
allowParallelSyncs |
long |
expectedRuntime
Used when duplicate pending syncs are present.
|
Bundle |
extras |
long |
flexMillis
Flex time of periodic sync in milliseconds
|
boolean |
isPeriodic |
int |
jobId
jobId of the JobScheduler job corresponding to this sync
|
String |
key
Operations are considered duplicates if keys are equal
|
static int |
NO_JOB_ID
This is used in the
sourcePeriodicId field if the operation is not initiated by a failed
periodic sync. |
String |
owningPackage |
int |
owningUid |
long |
periodMillis
Poll frequency of periodic sync in milliseconds
|
int |
reason
Why this sync was kicked off.
|
static int |
REASON_ACCOUNTS_UPDATED |
static int |
REASON_BACKGROUND_DATA_SETTINGS_CHANGED |
static int |
REASON_IS_SYNCABLE
Sync started because it has just been set to isSyncable.
|
static int |
REASON_MASTER_SYNC_AUTO
Sync started because master sync automatically has been set to true.
|
static int |
REASON_PERIODIC |
static int |
REASON_SERVICE_CHANGED |
static int |
REASON_SYNC_AUTO
Sync started because it has just been set to sync automatically.
|
static int |
REASON_USER_START |
int |
sourcePeriodicId
jobId of the periodic SyncOperation that initiated this one
|
int |
syncSource
Where this sync was initiated.
|
static String |
TAG |
SyncStorageEngine.EndPoint |
target
Identifying info for the target for this operation.
|
String |
wakeLockName
Descriptive string key for this operation
|
Constructor and Description |
---|
SyncOperation(Account account,
int userId,
int owningUid,
String owningPackage,
int reason,
int source,
String provider,
Bundle extras,
boolean allowParallelSyncs) |
SyncOperation(SyncOperation other) |
SyncOperation(SyncOperation op,
long periodMillis,
long flexMillis) |
SyncOperation(SyncStorageEngine.EndPoint info,
int owningUid,
String owningPackage,
int reason,
int source,
Bundle extras,
boolean allowParallelSyncs,
boolean isPeriodic,
int sourcePeriodicId,
long periodMillis,
long flexMillis) |
Modifier and Type | Method and Description |
---|---|
SyncOperation |
createOneTimeSyncOperation() |
Object[] |
toEventLog(int event) |
String |
toString()
Returns a string representation of the object.
|
public static final String TAG
public static final int NO_JOB_ID
sourcePeriodicId
field if the operation is not initiated by a failed
periodic sync.public static final int REASON_BACKGROUND_DATA_SETTINGS_CHANGED
public static final int REASON_ACCOUNTS_UPDATED
public static final int REASON_SERVICE_CHANGED
public static final int REASON_PERIODIC
public static final int REASON_IS_SYNCABLE
public static final int REASON_SYNC_AUTO
public static final int REASON_MASTER_SYNC_AUTO
public static final int REASON_USER_START
public final SyncStorageEngine.EndPoint target
public final int owningUid
public final String owningPackage
public final int reason
REASON_NAMES
public final int syncSource
public final boolean allowParallelSyncs
public final Bundle extras
public final boolean isPeriodic
public final int sourcePeriodicId
public final String key
public final long periodMillis
public final long flexMillis
public String wakeLockName
public long expectedRuntime
public int jobId
public SyncOperation(Account account, int userId, int owningUid, String owningPackage, int reason, int source, String provider, Bundle extras, boolean allowParallelSyncs)
public SyncOperation(SyncOperation op, long periodMillis, long flexMillis)
public SyncOperation(SyncStorageEngine.EndPoint info, int owningUid, String owningPackage, int reason, int source, Bundle extras, boolean allowParallelSyncs, boolean isPeriodic, int sourcePeriodicId, long periodMillis, long flexMillis)
public SyncOperation(SyncOperation other)
public SyncOperation createOneTimeSyncOperation()
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public Object[] toEventLog(int event)