This function has an optional out variable to capture the list of keys that get registered in this function. There are no tests that test the behavior of the function where the out variable is provided. The API deviates from the Java API which does not return the list of keys. Converting to return value means that either every call returns the list of keys, thus removing the optional behavior, or an additional flag must be provided on the parameter list to indicate that the return should be populated or not. Both are not great solutions.
I propose that we remove the optional parameter leaving the function return as void. -Jake