summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author Atneya Nair <atneya@google.com> 2023-04-21 18:35:40 -0700
committer Atneya Nair <atneya@google.com> 2023-05-03 15:40:58 -0700
commit749650c2cb0c1ab68221ec86f86027d5bd48d634 (patch)
treef9335502ddc7994b3d23923c70524e0c624f123c /libs/input/PointerController.cpp
parent70b1371bbc01e18b4a245b94ea998c95adc2237d (diff)
Add recognition session tokens
A recognition event can race with a start/stop/start in quick succession. Attributing the event to the incorrect startReco leads to state mismatch between lower/upper layers. - Associate each startRecognition with an IBinder token at the STModule layer - Invalidate the token field on downwards stop calls, and drop callbacks when no session is active - Add the token as a field to framework recognition event, so async clients can drop stale events - Additionally, add protection against a startRecognition while the lock is dropped in stopRecognition - Call new startReco version in STService, and drop callbacks for stale sessions - Drop wtf on stale callback in the HAL enforcer, since we handle it gracefully at a higher layer Bug: 236826280 Fixes: 275080257 Test: SoundTriggerManagerTest# testStartTriggerStopRecognitionRace_doesNotFail Test: CtsVoiceInteractionTestCases Test: FrameworksVoiceInteractionTests Test: Smoke tests Change-Id: I8a613b5f6821636e545309c09e6dfbb67626ea2b
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions