Application pause/resume fix for Android sample NativeActivity.
(cherry picked from commit 7da3e98dfd1539c027b26fd67f9225e93af8d144)