how do i disable from the TimePickerDialog to dismiss when press set ?

i need to check if the value is good , if it's no i don't want it to be dismiss . 

```
mTimePicker.setCancelable(true);

```

but i do want the user to be able to dismiss with cancel...

```
    TimePickerDialog mTimePicker;
            mTimePicker = new TimePickerDialog(this,
                    new TimePickerDialog.OnTimeSetListener() {
                        @Override
                        public void onTimeSet(TimePicker timePicker,
                                int selectedHour, int selectedMinute) {

                            if(condition){
                            mTimePicker.dismiss();

                               }else{
                            showMessage();
                                    }

                        }
                    }, hour, minute, false);// Yes 24 hour time
            mTimePicker.setTitle(getString(R.string.select_time));

            mTimePicker.show();

```