Merge "Clean up the native code to match Java update" into jb-mr2-dev