From b89f4b58b3018c38a22cac27c0eab32317b76d8c Mon Sep 17 00:00:00 2001 From: rmceoin Date: Fri, 16 Jan 2009 07:07:41 +0000 Subject: [PATCH] lock timeout preference now takes affect. git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1740 72b678ce-9140-0410-bee8-679b907dd61a --- src/org/openintents/safe/service/ServiceDispatchImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/openintents/safe/service/ServiceDispatchImpl.java b/src/org/openintents/safe/service/ServiceDispatchImpl.java index 6a0a968..39c5835 100644 --- a/src/org/openintents/safe/service/ServiceDispatchImpl.java +++ b/src/org/openintents/safe/service/ServiceDispatchImpl.java @@ -68,6 +68,7 @@ public class ServiceDispatchImpl extends Service { } private void startTimer () { + Log.d(TAG,"startTimer with timeoutUntilStop="+timeoutUntilStop); t = new CountDownTimer(timeoutUntilStop, timeoutUntilStop) { public void onTick(long millisUntilFinished) { //doing nothing. @@ -75,7 +76,7 @@ public class ServiceDispatchImpl extends Service { } public void onFinish() { - Log.d( "ServieDispatchImpl","timer onFinish" ); + Log.d(TAG,"onFinish()"); stopSelf(); // countdown is over, stop the service. } }; @@ -135,6 +136,7 @@ public class ServiceDispatchImpl extends Service { public void setTimeoutMinutes (int timeoutMinutesIn){ timeoutMinutes = timeoutMinutesIn; + timeoutUntilStop = timeoutMinutes * 60000; Log.d(TAG,"set timeout to "+timeoutMinutes); } }; -- 2.50.1