Fix Android orientation problem

If the device orientation changes after application launch,
accelerometer values are still calculated with the old orientation. This
patch fixes that.