title: Pressing back button in ActivityGroup causes it to pause, and then continue shutting down the next time the app is started
body: <p>Pressing the back button causes onPause to be called, and the app stays paused until it is re-launched by clicking on the icon, at which point, onDestroy gets called, and the main activity continues to shut down. </p>
  
  <p>Simple class to demonstrate.  Note, as far as I can tell, this <em>only</em> happens on the Nexus One.  I can't reproduce it in the emulator or on my Droid.</p>
  
  <pre><code>package com.vimtips.testshutdown;
  
  import android.app.ActivityGroup;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.KeyEvent;
  
  public class MainActivity extends ActivityGroup {
      private static final String TAG = "MainActivity";
      private int counter = 3;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
      }
  
      public boolean onKeyDown(int keyCode, KeyEvent event) {
          if(keyCode == KeyEvent.KEYCODE_BACK) {
  
              if(counter-- &gt; 0) return true;
          }
  
          return super.onKeyDown(keyCode, event);
      }
  
      @Override
      public void onPause() {
              super.onPause();
              Log.d(TAG, "onPause called");
      }
  
      @Override
      public void onDestroy() {
          super.onDestroy();
  
          if(isFinishing()) {
              Log.d(TAG, "Shutting down");
          }
      }
  }
  </code></pre>
  
  <p>And here's the log:</p>
  
  <pre><code>I/ActivityManager(  132): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10100000 cmp=com.vimtips.testshutdown/.MainActivity }
  I/ActivityManager(  132): Displayed activity com.vimtips.testshutdown/.MainActivity: 305 ms (total 305 ms)
  D/MainActivity( 1393): onPause called
  I/ActivityManager(  132): Displayed activity com.vimtips.testshutdown/.MainActivity: 302 ms (total 302 ms)
  D/MainActivity( 1393): Shutting down
  </code></pre>
  
  <p>This doesn't appear to happen on a normal Activity, just an Activity group, though looking at Android's sourcecode, I can't figure out why.  It's causing some serious problems with my app.</p>
  
  <p>Anyone know why this would happen?</p>