Solve the problem when game go to background/foreground on android.