Attempt to fix race of task surface visibility

1. Remove TaskOrganizerController#mTransaction because the
   standalone transaction may not be synced with pending
   transaction of window container and WMShell. That may cause
   potential race such as reverting the task surface visibility.
   The transaction was added in commit 14a657c for the case of
   entering PiP. Since commit 6567742, the task will be moved
   to back when setForceHidden, so it is already invisible.
   So the removal of 14a657c doesn't affect the PiP case.

2. Make task surface default invisible if the task can be organized,
   so the extra hide operation can be eliminated. That simplifies
   the control of task surface visibility.

Bug: 185400889
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I29d80acce2019a7d01a09e98112bc07763c9054b
2 files changed