title: using startActivityForResult() and then finish()
body: <p>I have a view in my android app that needs to open another view</p>
  
  <p>and also close\finish all the calling hierarchy that made it open.</p>
  
  <p>How can i do this?</p>
  
  <p>If i use this code, the finish() is never called no?</p>
  
  <pre><code>Intent intent = new Intent(A.this, B.class);
  setResult(RESULT_OK);
  startActivity(intent);
  finish();
  </code></pre>