Update WebSettings useragent docs.

Update the WebSettings.setUserAgentString API docs to explicitly specify
the effect it has on user agent client hints and related JS APIs.

This is not a behaviour change for WebView, just making the docs
describe what already happens.

Test: make offline-sdk-docs
Change-Id: I2db282efc4ee42b931824175abe627e871c4a86c
This commit is contained in:
Torne (Richard Coles)
2022-03-03 13:09:22 -05:00
parent 5546ba69d0
commit 7477b2c112

View File

@@ -1366,7 +1366,10 @@ public abstract class WebSettings {
* Sets the WebView's user-agent string. If the string is {@code null} or empty,
* the system default value will be used.
*
* Note that starting from {@link android.os.Build.VERSION_CODES#KITKAT} Android
* <p>If the user-agent is overridden in this way, the values of the User-Agent Client Hints
* headers and {@code navigator.userAgentData} for this WebView will be empty.
*
* <p>Note that starting from {@link android.os.Build.VERSION_CODES#KITKAT} Android
* version, changing the user-agent while loading a web page causes WebView
* to initiate loading once again.
*