Yes it does (based on a hall sensor), though looking up it turns out that it's actually the Nokia's kernel that does it, so other OSes may not do it.