Keep a strong pointer to Session in the HAL
If the client who's holding the other end of the Session goes away prematurely, the Session will have 0 strong references and will be destructed. That can cause a crash because the worker thread might still be working on a task that's referencing the Session's resources. By keeping a strong pointer to the Session in the HAL, we make sure that even if the client disappears, the tasks can gracefully finish. One small issue with this is that the Session's resources will not be freed until a new session is requested. This may need to be revised if we subscribe to client's binder death. The VTS test no longer crashes, but fails due to another unrelated issue. Bug: 181184674 Test: atest VtsHalBiometricsFingerprintTargetTest Change-Id: Ic0eafa525a7f714d26946db7c9b4ee5793f531e6
Loading
Please register or sign in to comment