Merge "[adb] generic "cast_handle_to_int" function"