@Override
    public void onClick(DialogInterface dialog, int which) {
        switch (which) {
            case BUTTON_POSITIVE:
                if (durationSetListener != null) {
                    durationSetListener.onDurationSet(durationInputView, durationInputView.getDuration());
                }
                break;
            case BUTTON_NEGATIVE:
                cancel();
                break;
        }
    }
Sets the duration to be shown in the dialog.

@param duration duration in milliseconds.
android/third_party/time-duration-picker/src/main/java/mobi/upod/timedurationpicker/TimeDurationPickerDialog.java