title: FLAG_ACTIVITY_CLEAR_TOP and android:launchMode="singleInstance"
body: <p>I think I've just found a really strange bug... But it can just be somekind of feature that I never heard of.</p>
  
  <p>On my application if I have any Activity on the AndroidManifest with android:launchMode="singleInstance" when you try to "clean" the stack to a certain point with the following code:</p>
  
  <pre><code>    Intent intent = new Intent(this, Xpto.class);
      intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
              | Intent.FLAG_ACTIVITY_CLEAR_TOP);
      startActivity(intent);
  </code></pre>
  
  <p>It goes to that activity. But when you press back, it returns to the previous.that should have been finished...</p>
  
  <p>Example:</p>
  
  <p>A -> B -> C</p>
  
  <p>Then from C I call A with Intent.FLAG_ACTIVITY_SINGLE_TOP| Intent.FLAG_ACTIVITY_CLEAR_TOP having A singleInstance on the Manifest. It goes to A but it only brings it to front. And does not finishes C and B.</p>
  
  <p>Can somebody explain this behaviour?</p>
  
  <p>The Xpto class I'm calling is at the time the root activity of the stack.</p>