IIRC the N900 has a light sensor as well. Porting autolock shouldn't be a big problem if the D-Bus interface didn't change too much.