handle enter foreground  event.