TimePickerDialog.onTimeSetListener not called
<p>I'm using the following code to display a <code>TimePickerDialog</code>:</p>

<pre><code>TimePickerDialog dialog = new TimePickerDialog(this, new OnTimeSetListener() {

        @Override
        public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
            System.out.println("onTimeSet");
        }
    }, 20, 15, true);
    dialog.setTitle("Test");
    dialog.setButton(TimePickerDialog.BUTTON_POSITIVE, "Done", new OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {
            System.out.println("Done");
        }
    });
    dialog.setButton(TimePickerDialog.BUTTON_NEGATIVE, "Cancel", new OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {
            System.out.println("Cancel");
        }
    });
    dialog.show();
</code></pre>

<p>On a device running Android 2.3.7, the <code>onTimeSet</code> method doesn't get called (the <code>onClick</code> methods do). On a device running 4.2.2 the <code>onTimeSet</code> does get called like it should.  </p>

<p>What is happening here?</p>
