Fix race condition in checkPattern and verifyPattern.

Bug: 31939282
Change-Id: I3250ab900f190ca9c820ac355ce94a699315b137
1 file changed