title: Activity.finish() does not finish activity
body: <p>I have an activity which has three fragments. I have also overridden the <code>onBackPressed()</code> method on my activity. When the user navigates to any of my fragments the standard behaviour of the back button occurs. Except for when I launch a fragment not from its "parent".</p>
  
  <p><strong>Imagine this:</strong> My activity has no UI. It only has 5 fragments. When the user is on either <code>fragment1</code>, <code>fragment2</code> or <code>fragment3</code> and presses the back button he must get out of the app (ie.by calling finish() in only activity the app has). <code>Fragment1Child</code> conceptually is a "child" of <code>fragment1</code> and <code>fragment2Child</code> is a "child" of <code>fragment2</code>. When going from <code>fragment1</code> or <code>fragment2</code> to their children and pressing back I get the expected behaviour. When though, I go from <code>fragment3</code> to <code>fragment2Child</code> and then press back I am presented correctly with with <code>fragment2</code>. Now when I press back the <code>Activity.finalize()</code> method I have is executed but the app is <strong>not</strong> closed. Instead I get back to <code>fragment3</code>!</p>
  
  <p>Here is my onBackPressed() method that checks what the is the current fragment shown and decides what to do accordingly</p>
  
  <pre><code>@Override
      public void onBackPressed() {
          Log.d(TAG, "MainACtivity.onBackPressed()");
          FragmentManager manager = getSupportFragmentManager();
          FragmentTransaction transaction = manager.beginTransaction();
  
          if (mDrawerLayout.isDrawerOpen(GravityCompat.START)) {
              Log.d("NIBHA", " Drawere  ++++++++++++++++++++++");
              mDrawerLayout.closeDrawers();
          } else {
              Fragment fragment = getSupportFragmentManager().findFragmentById(
                      R.id.fragment_container);
              Log.d("Nibha", "" + fragment);
              if (fragment instanceof DeliveryOrder
                      || fragment instanceof IncomingShipment
                      || fragment instanceof RentalAgreement) {
                  Log.d(TAG, "EXITING APP");
                  finish();
                  return;
  
              }
              if (fragment instanceof IncomingShipmentDetail
                      &amp;&amp; getIntent().getAction().equals("RA")) {
                  Log.d(TAG, "IS DETAIL CALLED FROM RA");
                  transaction.replace(R.id.fragment_container,
                          new IncomingShipment());
                  transaction.commit();
              }
              super.onBackPressed();
          }
  
      }
  </code></pre>