diff options
| author | 2023-03-22 17:00:50 -0400 | |
|---|---|---|
| committer | 2023-03-27 11:43:16 -0400 | |
| commit | bcffb9bc20b9f73bf7637fcd93a3217abf6587fd (patch) | |
| tree | 0430e90fdc5cc2d5ca22d832ef99c6e912094a3c | |
| parent | 26b284138c013247ef77ac0446459e69dfb29031 (diff) | |
Update WebView.setWebContentsDebuggingEnabled docs.
Update the docs for setWebContentsDebuggingEnabled to mention that this
is now enabled by default for debuggable apps, and to hilight that this
is sensitive for security.
Bug: 266946852
Test: m offline-sdk-docs
Change-Id: I5cf180e59ca5c7e8746f092f8f7303a3be107976
| -rw-r--r-- | core/java/android/webkit/WebView.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 0bbaac0fa987..6523fffc4b91 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -2000,8 +2000,19 @@ public class WebView extends AbsoluteLayout * in order to facilitate debugging of web layouts and JavaScript * code running inside WebViews. Please refer to WebView documentation * for the debugging guide. - * - * The default is {@code false}. + * <p> + * In WebView 113.0.5656.0 and later, this is enabled automatically if the + * app is declared as + * <a href="https://developer.android.com/guide/topics/manifest/application-element#debug"> + * {@code android:debuggable="true"}</a> in its manifest; otherwise, the + * default is {@code false}. + * <p> + * Enabling web contents debugging allows the state of any WebView in the + * app to be inspected and modified by the user via adb. This is a security + * liability and should not be enabled in production builds of apps unless + * this is an explicitly intended use of the app. More info on + * <a href="https://developer.android.com/topic/security/risks/android-debuggable"> + * secure debug settings</a>. * * @param enabled whether to enable web contents debugging */ |