diff options
| author | 2023-11-17 11:32:45 +0000 | |
|---|---|---|
| committer | 2023-11-29 12:39:40 +0000 | |
| commit | 96b62064b764438f7d7a1eddd937053b29c5bd62 (patch) | |
| tree | b77eeadad4664d43c3b85d48198111bc35c0a0a4 /libs/androidfw/FileStream.cpp | |
| parent | 1efd26d3909720f7dbc2b83eddcab3bfdb4e1790 (diff) | |
[speech] implement recognizer proxy
This is a followup to ag/25166321: it turns out the active connection
keeps the SpeechRecognizer object from being GC'd, so implementing a
finalizer there does not work.
This CL adds a proxy object that will actually get GC'd when the client
no longer holds a reference to it. Finalizing this object destroys the
actual SpeechRecognizer.
The public API is untouched.
Test: use a sample app to purposefully leak a bunch of SpeechRecognizer
objects, forcing GC in between. Observe a single session being active at
a time.
Bug: 297249772
Change-Id: I4ff6474dbc27858ad03731916cef5729ba9e6c96
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions