View Single Post
Posts: 252 | Thanked: 221 times | Joined on Jul 2010
#9
Originally Posted by chill View Post
Ok, so where did python (espeaktime.py) come from then?
I've looked into the code as pointed to by peterleichen (and it's not Python). It does have code for detecting whether or not the screen is locked, so it should work. The problem is with the N900s screen:

When you press the power button once, it should show the lock screen, but as we well know, it doesn't. Meanwhile, the lock screen is displayed, it's just that the screen is not backlit. To see what I mean, connect a TV to the N900's TV output, lock the device, and press the power button. The lock screen will show up on the TV but the N900's screen will stay dark (does not happen every time, of course, because the lock screen bug is only occasional).

So the N900 thinks it's showing the lock screen, and espeaktime duly notices and waits for the second power button press. The helpless user then obliges by pressing the second time (because he can't see the lock screen yet), which triggers espeak time even though the user only wants to see the lock screen, not hear the time.

One workaround could be to, since the lock screen display is being registered, to, upon detecting the lock screen, have the N900 display the lock screen again. In pseudocode:

if display_is_on AND device_is_locked then turn_display_on

The goal, if it's not clear, is to avoid having to press the button twice just to see the lock screen. I don't know how to turn the display on without unlocking the screen in the process...maybe set the brightness?

I don't have a better idea right now.
__________________
21.2011.38-1Smaemo7 (CSSU Stable)
2.6.28.10power53 (not overclocked)
Yes, I search before posting.
 

The Following User Says Thank You to chill For This Useful Post: