When finish() should be called?
===

I have an activity that calls second activity through an intent. After the second acivity is called I want to finish the first activity. Thus, I have the following code in onStop() method: 

	@Override
	public void onStop() {
		super.onStop();
		if (shouldBeClosed) {
			finish();
		}
	}

The problem is that my first activity is not closed. And I do not understand why? Maybe I should put this code into onPause()? But as I understand in this case, when activity loose focus (like after the call of a dialog) my activity can be closed. So the question why this happens and how I can correct this behaviour?

P.S. The variable shouldBeClosed is true. This is not the point.