title: android Intent.FLAG_ACTIVITY_REORDER_TO_FRONT not working as intended
body: <p>I am having a weird problem with FLAG_ACTIVITY_REORDER_TO_FRONT. I have 2 activities, A and B. A has a button to move to B and B has a button to move to A. So here we go.</p>
  
  <p>First scenario:</p>
  
  <ol>
  <li>The application starts with activity A</li>
  <li>Then I click the button to go to B</li>
  <li>I press the back button.</li>
  <li>Activity A is displayed (works as expected)</li>
  </ol>
  
  <p>Second scenario</p>
  
  <ol>
  <li>The application starts with activity A</li>
  <li>Then I click the button to go to B</li>
  <li>Then I click the button to go to A</li>
  <li>Then I click the back button</li>
  <li>My application closes</li>
  </ol>
  
  <p>Shouldn't my application go to B when i click the back button ?
  Even when I do a</p>
  
  <pre><code>adb shell
  dumpsys activity | grep -i run
  </code></pre>
  
  <p>right before clicking the back button, it displays 2 activities in the stack, A on top and B right under it.</p>
  
  <p>P.S. I am using the Intent.FLAG_ACTIVITY_REORDER_TO_FRONT to handle more complex scenarios when using these activities (and many more), that interestingly work just fine. It's only when I only have 2 Activities that I get this early exit of the application.</p>