Share the assertions between close with dismiss and close with swipe. Bug: 172037252 Test: atest WMShellFlickerTests:PipCloseWithSwipe WMShellFlickerTests:PipCloseWithDismissButton Change-Id: I03904f1de78d3204f9bdd0d6207ec4947f1404dd