Fixed rotation when screen is not locked.

Additionally move processing to the main thread asynchronous