-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: add not null checks to prevent running on destroyed activity #1148
Conversation
…m running on a destroyed activity
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.
Thank you for your PR.
I left a few comments, but I'm open minded. Let me know what you think.
Generally speaking I think this PR is 👍 I'll try to give this a more in-depth test later.
…nymore (i.e. is destroyed)
Codecov Report
@@ Coverage Diff @@
## master #1148 +/- ##
==========================================
+ Coverage 69.06% 71.74% +2.68%
==========================================
Files 20 21 +1
Lines 1833 1745 -88
==========================================
- Hits 1266 1252 -14
+ Misses 567 493 -74
Continue to review full report at Codecov.
|
I think the test failure is a lie, I'll restart the checks. |
Let me know if anything else is needed! |
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.
Code LGTM
Thank you for your contribution @secondVISION |
…ache#1148) * (android) apache#1002: Add Null Pointer Checks to prevent Cordova from running on a destroyed activity * (android) Add logging statements if Cordova Activity does not exist anymore (i.e. is destroyed) Co-authored-by: Habets Rick <[email protected]>
Platforms affected
Android
Motivation and Context
See issue and sample MVP/Videos in : #1002
Fixes #1002
Description
Added null pointer checks around
cordova.getActivity()
, to check if the activity hosting Cordova is still alive.Testing
Updated MVP (see issue #1002 ) locally with these changes (also updated gradle but is not pushed in this PR).
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)