I have an Android library project and the main application that uses this library project. The manifest file of the main application looks as follows:
You need to add keyboard|keyboardHidden
to the android:configChanges
attribute. Certainly on the emulator (and on certain devices, I think), when you change orientations the keyboard state also changes. This is also needed to prevent double-restarts of your activity when you don't have it handling orientation changes.
If you use abs, it is a limitation, and you can't solve it. But you don't use that library, so give this in the activity tag in manifest file
android:configChanges="keyboard|keyboardHidden|orientation"
remove that
android:screenOrientation="sensor"