Clear transitions from the map on merge

When a transition is merged, onTransitionFinished is never called for
it. This resulted on having leftover binder objects in the map. This cl
removes them on merge.

Also don't add transitions that are not TRANSIT_OPEN to the map.

Bug: 347517200
Test: atest TaskStackTransitionObserverTest
Flag: com.android.window.flags.enable_task_stack_observer_in_shell
Change-Id: I0492e1bf5e75c82db87dfd352a425d67e85dc3b9
2 files changed