From android doc here http://developer.android.com/reference/android/app/Activity.html,
it said \'Activity comes into foreground\' will call onPause(), and \'Ac
Being in the foreground means that the activity has input focus. For instance, an activity can be visible but partially obscured by a dialog that has focus. In that case, onPause() will be called, but not onStop(). When the dialog goes away, the activity's onResume() method will be called (but not onStart()).