by Daniel Ekenberg
Turns on vibrate mode when the phone is in face down position. Disables vibrate mode and restores previous sound mode when phone is face up. It is energy efficient since it uses no sensors when the screen is off. The state is only checked when the screen is on and then only every 10th second.
Turn off logging as the log file will grow quickly when the screen is on.