Remove dependency on jniGetNonMovableArrayElements.

jniGetNonMovableArrayElements is not safe and is going to be deleted.

Change-Id: I6daae1e4ac9e01ca593cda522fdbeb774eef1eff
(cherry picked from commit 75a5038849cecf38aba72721272ff07cca09501f)
Merge "Remove dependency on jniGetNonMovableArrayElements."
Fix whitespace issues after casts.

Change-Id: Ief3e50fbedd193e22509aac783f16ba1288908de
Merge "Fix whitespace issues after casts."