Fix CTS crash

Calling fail() from a callback thread after the main thread has
already called fail() results in the CTS process crashing, which
in turn can cause some tests to be missed when it is restarted.

Bug: 151448144
Test: run
Change-Id: I0464c2ce50d684d1e35d52133dcef725acb934c8
(cherry picked from commit 2de2456d8115ccdc8dceab9b7cbbbe0dc9041919)
1 file changed