From: isaac.jones Date: Fri, 16 Jan 2009 06:44:31 +0000 (+0000) Subject: Fixed issue where service timer failed to time out. X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=659885db3e6103833d34a26d03b9827e4a370c16;p=android-vcpass-oisafe Fixed issue where service timer failed to time out. git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1739 72b678ce-9140-0410-bee8-679b907dd61a --- diff --git a/AUTHORS b/AUTHORS index bb4e305..93749de 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,4 @@ Steven Osborn - http://steven.bitsetters.com Randy McEoin -Isaac Potoczny-Jones +Isaac Potoczny-Jones - http://www.syntaxpolice.org Peli diff --git a/src/org/openintents/safe/service/ServiceDispatchImpl.java b/src/org/openintents/safe/service/ServiceDispatchImpl.java index b657c6d..6a0a968 100644 --- a/src/org/openintents/safe/service/ServiceDispatchImpl.java +++ b/src/org/openintents/safe/service/ServiceDispatchImpl.java @@ -32,6 +32,7 @@ import android.util.Log; import android.os.CountDownTimer; public class ServiceDispatchImpl extends Service { + private static String TAG = "ServiceDispatchIMPL"; private CryptoHelper ch; private String masterKey; private CountDownTimer t; @@ -50,7 +51,7 @@ public class ServiceDispatchImpl extends Service { public void onCreate() { super.onCreate(); - Log.d( "ServieDispatchImpl","onCreate" ); + Log.d( TAG,"onCreate" ); } @Override @@ -63,19 +64,23 @@ public class ServiceDispatchImpl extends Service { Intent intent = new Intent(CryptoIntents.ACTION_CRYPTO_LOGGED_OUT); sendBroadcast(intent); - Log.d( "ADDERSERVICEIMPL","onDestroy" ); + Log.d( TAG,"onDestroy" ); } private void startTimer () { t = new CountDownTimer(timeoutUntilStop, timeoutUntilStop) { public void onTick(long millisUntilFinished) { //doing nothing. + Log.d(TAG, "tick: " + millisUntilFinished ); } public void onFinish() { + Log.d( "ServieDispatchImpl","timer onFinish" ); stopSelf(); // countdown is over, stop the service. } }; + t.start(); + Log.d(TAG, "Timer started with: " + timeoutUntilStop ); } private void restartTimer () {