title: Launcher Activity not launched from recent Apps
body: <p>Suppose there are two Activities :<br>
  1. <strong>Activity A</strong> (Launcher Activity)<br>
  2. <strong>Activity B</strong>   </p>
  
  <hr>
  
  <p>When Launching <strong>Activity B</strong> from <strong>Activity A</strong>, I finish the <strong>Activity A</strong>.   </p>
  
  <pre><code>startActivity(new Intent(A.this, B.class));
  finish();
  </code></pre>
  
  <hr>
  
  <p>and If exit button clicked from <strong>Activity B</strong>, the <strong>Activity B</strong> get finished.   </p>
  
  <pre><code>ExitButton.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  finish();
              }
          });
  </code></pre>
  
  <hr>
  
  <p>So, suppose <strong>Activity B</strong> get launched from <strong>Activity A</strong>, and I get exit from <strong>Activity B</strong> (or exit from Application). There are 2 option, from where the application get launched :<br>
  1. From launcher icon<br>
  2. From Recent Apps </p>
  
  <p>Now, If the application launched from <strong>launcher icon</strong> , then <strong>Activity A</strong> get launched. But If the application launched from <strong>Recent Apps</strong>, then <strong>Activity B</strong> get launched.   </p>
  
  <hr>
  
  <p>I think, <strong>Activity B</strong> remains in stack, even if the I call <strong>finish()</strong> for it.<br>
  My Question is : How can I clear the stack, when application get exit ? Tested in Android 2.3.6 version</p>