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