Merge "Use getParameter return value for the preset length" into main