[Android] Fixed the app crashing on rotation

Rotating the screen will restart the app with the new window/orientation.
Merge pull request #641 from MarioLiebisch/android-statesfix

[Android] Fixed the app crashing on rotation