Improved device rotation recognition.