@Implements(android.webkit.WebSettings.class) public class ShadowWebSettings extends Object
WebSettings
which returns a dummy user a stub instance rather than the
User-Agent used by a WebView.Constructor | Description |
---|---|
ShadowWebSettings() |
Modifier and Type | Method | Description |
---|---|---|
protected static String |
getDefaultUserAgent(Context context) |
Returns the default User-Agent used by a WebView.
|
static void |
reset() |
|
static void |
setDefaultUserAgent(String defaultUserAgent) |
Sets the default user agent for the WebView.
|
@Implementation(minSdk=18) protected static String getDefaultUserAgent(Context context)
WebSettings.setUserAgentString(String)
.context
- a Context object used to access application assetspublic static void setDefaultUserAgent(String defaultUserAgent)
getDefaultUserAgent(Context)
.@Resetter public static void reset()