Merge "Fix race condition in checkPattern and verifyPattern." into cw-f-dev
am: 1e746a415d

Change-Id: I85c6dca765e7a205005b120ce787aa8f086c6967