Use setMaxDate()
.
For example, replace return new DatePickerDialog(this, pDateSetListener, pYear, pMonth, pDay)
statement with something like this:
DatePickerDialog dialog = new DatePickerDialog(this, pDateSetListener, pYear, pMonth, pDay);
dialog.getDatePicker().setMaxDate(new Date().getTime());
return dialog;