Fine tuning of restarting activities

Fixes some issues where a blank screen could be shown when resuming, or email APKG dialog could be reshown, etc