Did you try blocking the orientation from the AndroidManifest ? by adding the below line in your camera activity
<activity android:label="@string/activity_name" android:screenOrientation="portrait" />
or
<activity android:label="@string/activity_name" android:screenOrientation="landscape" />