Actually the scenario is a bit more complex than described it the title.
The situation is the following:
Activity A starts Activity B.
Activity A must not be destroyed when I start Activity B because I need the user to be able to navigate back to A.
When the user presses the HOME button the user opens the Recent Apps window and switches from my app to another app. At this stage both A and B are STOPPED.
When the user user opens the Recent Apps window and switches back for the other app to my app: Activity B is RESTARTED (activity A is not restarted yet)
Now on Activity B there is a button to close the entire app, closing both B and A, and it does close both activities using this approach: https://stackoverflow.com/a/11509279/1815311
THE PROBLEM IS THAT WHEN ACTIVITY B TRIES TO CLOSE BOTH B AND A, IN THE DESCRIBED SCENARIO, ACTIVITY A SOMETIMES IS NULL !!
How do I cope with such a scenario?