title: Android Activity rotates after onActivityResult
body: <p>I have an <code>Activity</code> which records videos from the front camera for the <code>Activity</code>. The orientation is locked to Portrait in the <code>AndroidManifest.xml</code> file via the following code:</p>
  
  <pre><code>&lt;activity
              android:name=".activity.SomeVideoActivity"
              android:configChanges="orientation|keyboardHidden|screenSize"
              android:label="Video Activity"
              android:screenOrientation="portrait" /&gt;
  </code></pre>
  
  <p>This works fine if the user enters the screen for the first time. However, after leaving this activity and coming back to it, apparently landscape mode is re-enabled.</p>
  
  <p>I managed to salvage the situation by forcing the orientation at via the following codeblock:</p>
  
  <pre><code>@Override
   protected void onResume() {
     super.onResume();
     this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
  }
  </code></pre>
  
  <p>So I am just curious as to why this happens only on just this one activity. I have checked other activities for <code>onActivityResult</code> and they don't messed up the orientation settings at all. </p>
  
  <p><strong>UPDATE</strong>: </p>
  
  <p>Actually this problem is solved by using <code>this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);</code> as my sole intention is to lock the activity to portrait and disable landscape rotation. I just want to <em>understand</em> why rotation is re-enabled in <code>SomeVideoActivity</code> after it returns from another activity even though it is declared to have portrait orientation in <code>AndroidManifest</code>. </p>