title: how to close activity properly when back pressed
body: <p>I am opening a fragment1 on Activity A and go fragment1 to Activity B and back again fragment1 when i went again fragment1 to Activity B then click on button (Activity B) then re open Activity B. but i want finish this activity B and open again Activity A if i do without back press ( Activity A -> fragment1 -> Activity B  -> onClick button ) then it work fine. 
  one more thing if i back press 2 or more time then ActivityB also re-open 2 or more time. here I try with onBackPressed():</p>
  
  <pre><code>@Override
  public void onBackPressed() {
      theatreList.clear();
      finish();
      super.onBackPressed();
  }
  </code></pre>
  
  <p>and there is onClick of button( Activity B)</p>
  
  <pre><code>Intent intent = new Intent();
      intent.putExtra("bundleIds", bundleIds);
      setIntent(intent);
      finish();
  </code></pre>
  
  <p>and finish() function:</p>
  
  <pre><code>@Override
  public void finish() {
      setResult(RESULT_OK, getIntent());
      super.finish();
  }
  </code></pre>