mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-11 16:37:28 +00:00
Merge pull request #11215 from keymanapp/chore/common/enable-webview-debugging
chore(android): enables debugging and inspection of mobile app internal webviews
This commit is contained in:
commit
eaff3a3eb0
1 changed files with 7 additions and 1 deletions
|
|
@ -232,7 +232,13 @@ final class KMKeyboard extends WebView {
|
|||
|
||||
getSettings().setUseWideViewPort(true);
|
||||
getSettings().setLoadWithOverviewMode(true);
|
||||
if (0 != (context.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)) {
|
||||
|
||||
// When `.isTestMode() == true`, the setWebContentsDebuggingEnabled method is not available
|
||||
// and thus will trigger unit-test failures.
|
||||
if (!KMManager.isTestMode() && (
|
||||
(context.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0 ||
|
||||
KMManager.getTier(null) != KMManager.Tier.STABLE
|
||||
)) {
|
||||
// Enable debugging of WebView via adb. Not used during unit tests
|
||||
// Refer: https://developer.chrome.com/docs/devtools/remote-debugging/webviews/#configure_webviews_for_debugging
|
||||
setWebContentsDebuggingEnabled(true);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue