Do not preserve window when window not added

When an Activity is resumed but not visible, causing the window not to
be added, if the Activity is later relaunched and the window is
retained, this will result in the window never being added.

To resolve this issue, we do not preserve the window when it has never
been added.

Bug: 369973805
Test: Presubmit

Change-Id: Ib89c76af32006c7a0e16ad8ec01076f48cdc184a
1 file changed