Also contains fixes for native methods specific to the branch. Change-Id: I7b34e2ec0164520efc658053a80f307791a992b1 (cherry-picked from commit: 279c00e8)