Fix swipe-to-dismiss to properly react to swipe gestures. am: 8a9b27773b
am: 4308eaa477

Change-Id: Id5fa0c8bd66ca7970c971884c1067aca4ac24124