The return type of callbacks was changed from int to an enum. (cherry picked from commit d17eabb1)
mentioned in commit 3120ad89
mentioned in commit 7bc54463