Methods Summary |
---|
protected java.lang.Object | clone()
throw new CloneNotSupportedException("doesn't implement Cloneable");
|
protected void | onSyncInit()
|
public void | resetSync()resetSync() resets sync manager's timer
if (Config.LOGV) {
Log.v(LOGTAG, "*** WebSyncManager resetSync ***");
}
if (mHandler == null) {
return;
}
mHandler.removeMessages(SYNC_MESSAGE);
Message msg = mHandler.obtainMessage(SYNC_MESSAGE);
mHandler.sendMessageDelayed(msg, SYNC_LATER_INTERVAL);
|
public void | run()
// prepare Looper for sync handler
Looper.prepare();
mHandler = new SyncHandler();
onSyncInit();
// lower the priority after onSyncInit() is done
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
Message msg = mHandler.obtainMessage(SYNC_MESSAGE);
mHandler.sendMessageDelayed(msg, SYNC_LATER_INTERVAL);
Looper.loop();
|
public void | startSync()startSync() requests sync manager to start sync
if (Config.LOGV) {
Log.v(LOGTAG, "*** WebSyncManager startSync ***, Ref count:" +
mStartSyncRefCount);
}
if (mHandler == null) {
return;
}
if (++mStartSyncRefCount == 1) {
Message msg = mHandler.obtainMessage(SYNC_MESSAGE);
mHandler.sendMessageDelayed(msg, SYNC_LATER_INTERVAL);
}
|
public void | stopSync()stopSync() requests sync manager to stop sync. remove any SYNC_MESSAGE in
the queue to break the sync loop
if (Config.LOGV) {
Log.v(LOGTAG, "*** WebSyncManager stopSync ***, Ref count:" +
mStartSyncRefCount);
}
if (mHandler == null) {
return;
}
if (--mStartSyncRefCount == 0) {
mHandler.removeMessages(SYNC_MESSAGE);
}
|
public void | sync()sync() forces sync manager to sync now
if (Config.LOGV) {
Log.v(LOGTAG, "*** WebSyncManager sync ***");
}
if (mHandler == null) {
return;
}
mHandler.removeMessages(SYNC_MESSAGE);
Message msg = mHandler.obtainMessage(SYNC_MESSAGE);
mHandler.sendMessageDelayed(msg, SYNC_NOW_INTERVAL);
|
abstract void | syncFromRamToFlash()
|