Closed breautek closed 1 year ago
Merging #1605 (57369f3) into master (2252c09) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #1605 +/- ##
=======================================
Coverage 71.82% 71.82%
=======================================
Files 23 23
Lines 1796 1796
=======================================
Hits 1290 1290
Misses 506 506
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
I don't anticipate breaking changes from this change, however it is a difference in behaviour since CoreAndroid won't be lazily loaded, therefore I've marked this commit has a breaking change.
Platforms affected
Android / CoreAndroid plugin
Motivation and Context
CoreAndroid was lazily loaded via
getPlugin
call. This can create a race condition in some situations, particularly with a new feature in the works: https://github.com/apache/cordova-android/pull/1574 where onRenderProcessGone may be invoked before anything gets a chance to callgetPlugin
forCoreAndroid
.In general, because this is Core plugin, I feel like it should always be loaded in, not lazily loaded in.
Description
Inside
PluginManager
, I added a new public API:addService(String serviceName, String className, bool onload)
. TheaddService(String serviceName, String className)
implementation has been moved to the new public API.CordovaWebviewImpl
will now add the CoreAndroid service withonload
set to true.Testing
Ran
npm test
on linux. Also manual test while testing the onRenderProcessGone PR.Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)