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

Ensure boolean object from map serialised as boolean primitive in JNI #452

Merged
merged 2 commits into from
Apr 3, 2019

Conversation

fractalwrench
Copy link
Contributor

Goal

Boolean metadata fields in fatal native crashes were always serialised as true due to a bug where a reference to a java/lang/Boolean object was cast to a bool. This fix calls Boolean#booleanValue instead, so that the true/false value is serialised correctly in native crashes.

Tests

Tested the example app on an emulator and Nexus 5x, and verified that app.emulator was respectively true and false for a native crash.

@fractalwrench fractalwrench merged commit b757093 into master Apr 3, 2019
@fractalwrench fractalwrench deleted the jni-bool-cast-fix branch April 3, 2019 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants