Merge "Refactor setCurrentFunction and setUsbDataUnlocked into one method"