|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.engine.BaseEngine com.vodafone360.people.engine.upgrade.UpgradeEngine
public class UpgradeEngine
Checks Settings.UPGRADE_CHECK_URL for information on a software upgrade . Triggers a dialog in the UI when a newer application version is available Throttles UI events
Nested Class Summary | |
---|---|
private class |
UpgradeEngine.UpgradeEngineNetworkThread
Thread for running an upgrade check without blocking the WorkerThread. |
Nested classes/interfaces inherited from class com.vodafone360.people.engine.BaseEngine |
---|
BaseEngine.IEngineEventCallback |
Field Summary | |
---|---|
private boolean |
mActivated
|
private long |
mCheckFrequencyMillis
|
private Context |
mContext
|
private boolean |
mForceOnce
|
private long |
mNextRunTime
|
private UpgradeEngine.UpgradeEngineNetworkThread |
mUpgradeEngineNetworkThread
|
private UpgradeStatus |
mUpgradeStatus
|
Fields inherited from class com.vodafone360.people.engine.BaseEngine |
---|
mActiveUiRequest, mCurrentTimeout, mEngineId, mEventCallback |
Constructor Summary | |
---|---|
UpgradeEngine(Context context,
BaseEngine.IEngineEventCallback eventCallback)
Constructor. |
Method Summary | |
---|---|
void |
checkForUpdates()
Add request to check for application update. |
long |
getNextRunTime()
Return the mNextRunTime value if the feature is enabled. |
void |
onCreate()
This will be called immediately after creation. |
void |
onDestroy()
This will be called just before the engine is shutdown. |
protected void |
onRequestComplete()
This function must be implemented in the derived engine implementation. |
protected void |
onTimeoutEvent()
The derived engine implementation must call the processTimeout() function (normally from within the run() implementation), otherwise this will not be called. |
protected void |
processCommsResponse(ResponseQueue.Response resp)
The derived engine implementation must call the processCommsInQueue() function (normally from within the run() implementation), otherwise this will not be called. |
protected void |
processUiRequest(ServiceUiRequest requestId,
java.lang.Object data)
The derived engine implementation must call the processUiQueue() function (normally from within the run() implementation), otherwise this will not be called. |
void |
run()
Trigger the UpgradeEngineNetworkThread if the feature is enabled. |
void |
setNewUpdateFrequency()
Sets a new value for the frequency with which to check for application updates. |
private void |
setNextRuntime()
|
Methods inherited from class com.vodafone360.people.engine.BaseEngine |
---|
addUiRequestToQueue, clearTimeout, completeUiRequest, completeUiRequest, deactivateEngine, emptyUiRequestQueue, engineId, genericHandleResponseType, getCurrentTimeout, isCommsResponseOutstanding, isDeactivated, isUiRequestOutstanding, onCommsInMessage, onReset, processCommsInQueue, processTimeout, processUiQueue, setReqId, setTimeout |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Context mContext
private UpgradeStatus mUpgradeStatus
private long mCheckFrequencyMillis
private long mNextRunTime
private boolean mForceOnce
private boolean mActivated
private UpgradeEngine.UpgradeEngineNetworkThread mUpgradeEngineNetworkThread
Constructor Detail |
---|
public UpgradeEngine(Context context, BaseEngine.IEngineEventCallback eventCallback)
context
- - the context to useeventCallback
- - the engine event client to useMethod Detail |
---|
public long getNextRunTime()
getNextRunTime
in class BaseEngine
public void run()
run
in class BaseEngine
private void setNextRuntime()
protected void processUiRequest(ServiceUiRequest requestId, java.lang.Object data)
BaseEngine
processUiRequest
in class BaseEngine
requestId
- The UI request IDdata
- Request data (object type is request specific)public void onCreate()
BaseEngine
onCreate
in class BaseEngine
public void onDestroy()
BaseEngine
onDestroy
in class BaseEngine
protected void onRequestComplete()
BaseEngine
onRequestComplete
in class BaseEngine
protected void onTimeoutEvent()
BaseEngine
onTimeoutEvent
in class BaseEngine
protected void processCommsResponse(ResponseQueue.Response resp)
BaseEngine
processCommsResponse
in class BaseEngine
resp
- The comms responsepublic void setNewUpdateFrequency()
public void checkForUpdates()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc