Start all visible running activities when attaching app

This fixes an issue where a translucent activity was on top of a
normal activity in the same process. Now, when reopening the
translucent activity after the process has been killed we only
used to start the very top activity, leaving the normal activity
in destroyed state. However, we make the activity visible already
so in window manager we are waiting for it but a window is never
added to it.

This fixes the issue by starting all activities that are visible
and running once the app is attached.

Test: go/wm-smoke
Test: Have app with translucent activity on top of normal
activity, kill app via shell, navigate back to app via recents.
Observe no excessive delay.

Change-Id: I444b7064b8e2e878fac5fa9ac8b36e0e2fe248bc
Fixes: 33269100
3 files changed