title: Android don't call onPause and onStop when looping process is running
body: <p>I create a very simple android application with a single button name is 'Generate'. The activity handle onclick event.</p>
  
  <pre><code>public void autoGenerate(View view) throws InterruptedException {
      Log.v("Hello", "I'm Duy");
      final int count = 10000;
      for (int i = 0; i &lt; count; i++) {
          Log.v("Count", String.valueOf(i));
          Thread.sleep(1000);
      }
  }
  </code></pre>
  
  <p>I've added log to onPause and onStop.</p>
  
  <pre><code>@Override
  protected void onPause() {
      Log.v("Life Cycle", "onPause ...");
      super.onPause();
  }
  
  @Override
  protected void onStop() {
      Log.v("Life Cycle", "onStop ...");
      super.onStop();
  }
  </code></pre>
  
  <p>I click Generate button, this application print the counter value in LogCat. Then I click home button on my phone, there's no callback happened util the looping is completed. I totally don't understand this case because I think when the app disappear, system should call the callback onPause and onStop.</p>
  
  <p>Can anyone help me? I'm just a beginner who start reading android e-book.</p>