Merge "Improve accelerometer-based orientation sensing."