mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
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:
parent
2476762007
commit
eee9068f2a
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue