@Override
    protected void onSetInitialValue(boolean restorePersistedValue, Object defaultValue) {
        final long duration;
        if (restorePersistedValue)
            duration = getPersistedLong(0);
        else
            duration = Long.parseLong(defaultValue.toString());

        // need to persist here for default value to work
        setDuration(duration);
        updateDescription();
    }
Gets the {@link TimeDurationPicker} used by this dialog.

@return the picker used by this dialog.
android/third_party/time-duration-picker/src/main/java/mobi/upod/timedurationpicker/TimeDurationPickerPreference.java