Bug 1061324 follow up - Intermittent fix and app closing hardening.

Let's pass the homescreen as a parameter here.