summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorYtai Ben-Tsvi <ytai@google.com>2021-01-26 12:11:40 -0800
committerEric Laurent <elaurent@google.com>2021-01-27 08:39:37 +0000
commite867da399e2adaeb4ff9ef175fa2007cfe79141e (patch)
treef7607143d31e76f096d8817ffecdabf063e5abc7 /tools/aapt2/java/JavaClassGenerator.cpp
parent6f777546502dfd0d8d5fbe30cd0d9efad0e8a4fd (diff)
Better fix for race condition in SoundTriggerHw2Enforcer
This reverts commit 139f7c23898bff49ea6eb9a1f6cdb7e43d28d8ac. That commit had a potential for a deadlock, since calls both to and from the HAL are synchronized and because of the requirement that events are not permitted after stop() has been called, the HAL implementation must block stop() for any outstanding events, but those events might be blocked during the callback. This fix avoids the original issue addressed by that commit in a different manner: it simply reversed the ordering of setting the model state and invoking start(), so that if an event arrives before start() returns, we would still consider it valid. Fixes: 177795410 Test: Manual verification of STHAL operation. Sent patch to bug reporter to apply and test. Change-Id: I5b08158eaed8e4bba9f77249b7d5e5b73c33a744 (cherry picked from commit 9efec8111bdd68ef8bc3ed4053ac1c4b69192a9b)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions