Fix the white flash issue when apps pause and resume

onShow() and onHide() are called by XWalkView internally.