Weird, Android doesn't have TimeUnit.MINUTES

git-svn-id: https://zxing.googlecode.com/svn/trunk@1532 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2010-08-14 19:00:54 +00:00
parent 2476762007
commit eee9068f2a

View file

@ -29,7 +29,7 @@ import android.app.Activity;
*/
final class InactivityTimer {
private static final int INACTIVITY_DELAY_MINUTES = 3;
private static final int INACTIVITY_DELAY_SECONDS = 5 * 60;
private final ScheduledExecutorService inactivityTimer =
Executors.newSingleThreadScheduledExecutor(new DaemonThreadFactory());
@ -44,8 +44,8 @@ final class InactivityTimer {
void onActivity() {
cancel();
inactivityFuture = inactivityTimer.schedule(new FinishListener(activity),
INACTIVITY_DELAY_MINUTES,
TimeUnit.MINUTES);
INACTIVITY_DELAY_SECONDS,
TimeUnit.SECONDS);
}
private void cancel() {