Fix the white flash issue when apps pause and resume

onShow() and onHide() are called by XWalkView internally.
Fix engine declaration to only apply to Android