Double-tap gesture: Code improvement

Thanks to Dave Kessler

Change-Id: I60be7c2bf5a28fa1091ef6cd0d07f7f963950eb6