private void setDurationString(String hours, String minutes, String seconds) {
            input.setLength(0);
            if (timeUnits == HH_MM || timeUnits == HH_MM_SS)
                input.append(hours);
            input.append(minutes);
            if (timeUnits == HH_MM_SS || timeUnits == MM_SS)
                input.append(seconds);
        }
Encapsulates the digit input logic and text to duration conversion logic.
android/third_party/time-duration-picker/src/main/java/mobi/upod/timedurationpicker/TimeDurationPicker.java