Android: Dialog triggered onResume
<p>I am experiencing a weird behavior in my app.</p>

<p>I have an Activity with a ListView. When you click on an item in the ListView, a TimePickerDialog is shown.</p>

<p>If I hit the home button after closing the dialog, and then reload the app, the TimePickerDialog is shown automatically again.</p>

<p>Now, I don't know why this behavior happens. I have logged messages at different points in the app to try to determine how it is triggered but to no avail.</p>

<p>I even added this line:</p>

<pre><code>Log.d("TEST", "TEST");
</code></pre>

<p>inside the constructor of the TimePickerFragment and it is not getting fired! Yet the dialog is showing up!</p>

<p>What is going on here?</p>
