Waiting a proper time to remove the snapshot starting window

As CL[1] removed the delay time to remove starting window in shell,
even the benifits is to make good touch responsiness when launched the
activity, but may easier cause flickering since removing the starting
window when the activity allDrawn doesn't means the UI are all set.
(like some apps might needs adjust the surface frame or even IME
needs more time wait for animation finish, if the snapshot window
has these previews).

In case flickering happens when the Shell removes the task snapshot
window too quickly, partially reverts CL[1] delay removal logic
in TaskSnapshotWindow#remove, and use TaskSnapshot#hasImeSurface
to set a proper delay removal time:
   - General (no IME visible): 100ms
   - IME visible: 350ms

[1]: I5fb0fa3a1e6a5e6210d3baf400a84c5892bd2e34

Fix: 189825624
Test: manual switch tasks with/without ime window, also test
with some market input methods.

Change-Id: I7865e17b57961e12a0cdcf068e412195123a6ec7
2 files changed