Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Android: Improve surface destroy handling. #3316

Conversation

cristianoccazinsp
Copy link
Contributor

Prevents UI freezes due to the lock being acquired on the surface destroyed callback. This also prevents a warning when the camera unmounts due to multiple calls to stop, and the first one destroying the background handler.

This issue becomes more visible when using react-native-screens, and I pinned it down to this lock being acquired.

Prevents UI freezes due to the lock being acquired on the surface destroyed callback.
@cristianoccazinsp cristianoccazinsp changed the title Improve surface destroy handling. Android: Improve surface destroy handling. Aug 17, 2021
@MateusAndrade MateusAndrade merged commit 5d36cf1 into react-native-camera:master Aug 17, 2021
n1ru4l pushed a commit that referenced this pull request Aug 17, 2021
## [4.0.2](v4.0.1...v4.0.2) (2021-08-17)

### Bug Fixes

* Improve surface destroy handling. ([#3316](#3316)) ([5d36cf1](5d36cf1))
@n1ru4l
Copy link
Collaborator

n1ru4l commented Aug 17, 2021

🎉 This PR is included in version 4.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@cristianoccazinsp cristianoccazinsp deleted the android-fix-surface-destroyed branch August 26, 2021 23:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants