Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Android): prevent crash with InsetsObserverProxy already registered #2526

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Nov 20, 2024

Description

Activity restarts do not invalidate JVM state entirely (at least it seems so), therefore InsetsObserverProxy
kept being registered on some decorview between activity restarts (context recreations) leading to crash
(we guard against multiple registrations).

Fixes #2519
Possibly fixes #2507

Changes

InsetsOberverProxy row registers for context lifecycle, when it's destroyed it cleans its state.

Test code and steps to reproduce

Haven't managed to reproduce this myself, but got confirmation in #2507 that this patch works.

Checklist

@kkafar kkafar merged commit b58f13a into main Nov 21, 2024
4 checks passed
@kkafar kkafar deleted the @kkafar/fix-crash-with-proxy-already-registered branch November 21, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant