-
Notifications
You must be signed in to change notification settings - Fork 2
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
RNMT-4515 Refactor the fix for Android 11 #8
Conversation
After being able to validate that the issue with the `sqlite3_open_v2` native primitive is only affecting some specific devices (eg: Pixel 4 XL), we should only apply the hotfix as a fallback and not as a workaround for every device running Android 11. References https://outsystemsrd.atlassian.net/browse/RNMT-4515
@@ -216,7 +216,20 @@ private SQLiteAndroidDatabase openDatabase(String dbname, CallbackContext cbc, b | |||
Log.v("info", "Open sqlite db: " + dbfile.getAbsolutePath()); | |||
|
|||
SQLiteAndroidDatabase mydb = old_impl ? new SQLiteAndroidDatabase() : new SQLiteConnectorDatabase(); | |||
mydb.open(dbfile); | |||
try { | |||
mydb.open(dbfile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If mydb
fails to open, then no cleanup code such as close
or similar needs to be executed, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that's right!
mydb = new SQLiteAndroidDatabase(); | ||
mydb.open(dbfile); | ||
} | ||
else{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space between else
and {
💅
I will close this PR since we now have a fix for the root cause. |
@luissilvaos i was wondering if you could help us |
Description
This PR refactors the hotfix for Android 11 that was introduced in #7
These new changes will ensure that the hotfix is not applied for every device running Android 11, but only to the specific devices that are facing the reported issue (eg.: Pixel 4 XL).
Context
Fixes: https://outsystemsrd.atlassian.net/browse/RNMT-4515