commit | 01d65e01d0772af82f79e25fca6be92e0540f3b8 | [log] [tgz] |
---|---|---|
author | William Escande <wescande@google.com> | Tue May 09 16:37:45 2023 -0700 |
committer | Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Mon May 15 18:47:00 2023 +0000 |
tree | 5b096c6ed9226c54cfa13490450203ffb3680f1f | |
parent | bfd7403089809f0ae2342e056f5a44f3d1d1d4e6 [diff] |
Fix deathRecipient of BluetoothAudioProvider The "provider" is managed with a shared_ptr but we do not hold it and instead are giving the raw inner pointer as binderDiedCallbackAidl. This can randomly generate crash as the provider may be freed outside of this code. Replacing the provider with a context that we can manually allocate and deallocate. Setup AIBinder_DeathRecipient_setOnUnlinked to clean the data allocated Bug: 245009140 Test: m android.hardware.bluetooth.audio-impl and start / stop session + manually kill bluetooth process during audio play (cherry picked from https://android-review.googlesource.com/q/commit:f3faab081a543ad43e86eec6d03cd7835ef5c712) Merged-In: I0c14c062a8bde7e532ff02f01991d66da33ec569 Change-Id: I0c14c062a8bde7e532ff02f01991d66da33ec569