handle missing orientation sensor

If a device has no orientation sensor (like Genymotion emulator), then a
SensorManager log entry is created each time we try to register a
listener. Avoid the registration if there is no sensor.