Merge "Fix an edge case in IMS#switchInputMethod()" into main