feat: InspectableWebview preference #1589
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Platforms affected
Motivation and Context
Sister PR of apache/cordova-ios#1300
Makes cordova-android honour the
InspectableWebview
preference in a similar fashion the iOS platform.Description
Like iOS, android will default to the original method of choosing if the inspecter should be enabled based on the module's debuggable flag. So if the preference is unset, the inspecter will be enabled on debug builds, and disabled on release builds.
If the preference is set and if, and only if the value is
"true"
, the webview inspecter will be forcefully enabled.If the preference is set but is not
"true"
(including any invalid value), the webview inspector will be forcefully disabled.Unlike iOS, Android has had the ability to independently control the inspecter programmatically for some time, so there is no Android OS limitation.
Testing
Ran npm test
Manual obesrvations in HelloWorld test app.
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)