durka/HallMonitor

delay timer starts before lockscreen comes up

Closed this issue · 0 comments

It takes a little bit of time for the lock screen to come up after calling DevicePolicyManager.lockNow. But Hall Monitor's timer doesn't know this. So when the lockscreen is already up and the cover is closed, it seems to stay up longer than when the cover is closed on an unlocked phone. This makes it hard to set a good delay time.

Solutions include:

  • two delay settings
  • multiply the delay by 0.75 or something
  • wait for the lockscreen to come up (somehow) before starting the countdown
  • replace the lockscreen with our own thing that comes up instantly (i.e. #4)