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

feat: InspectableWebview preference #1589

Merged

Conversation

breautek
Copy link
Contributor

@breautek breautek commented Apr 9, 2023

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

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@codecov-commenter
Copy link

codecov-commenter commented Apr 9, 2023

Codecov Report

Merging #1589 (489ac98) into master (d4bfd50) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1589   +/-   ##
=======================================
  Coverage   72.13%   72.13%           
=======================================
  Files          21       21           
  Lines        1751     1751           
=======================================
  Hits         1263     1263           
  Misses        488      488           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@breautek breautek merged commit a78fad1 into apache:master Apr 9, 2023
6 checks passed
@breautek breautek deleted the feat/preference/inspectable-webview branch April 9, 2023 23:41
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.

None yet

3 participants