Ensure activity visiblity when moving task

There was a visibility problem when multiple already running
activity got resized at the same time.
Only the last activity launched that got focus was shown and all others
were not.

The problem arose when a new ActivityStack got created and the
(existing) window got attached which led to the divergence of the
visibility states in different objects. The WindowState thinks
that it is visible, but the AppWindowToken thinks that it is not.
Subsequent calls to WindowState::ShowLw ignore calls to show the window
and the application logic enters the GONE state until it recieves focus.

Bug: 20692085

Change-Id: Ifc0e3686398ccd1d1ff32e1a266163b8db5b7f26
1 file changed