Class GeckoRuntimeSettings
- All Implemented Interfaces:
Parcelable
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Settings builder used to construct the settings object.static @interface
static @interface
static @interface
The trusted recursive resolver (TRR) modes.static @interface
See the `WebContentIsolationStrategy` enum in `ProcessIsolation.cpp`.Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Allow all insecure connectionsstatic final int
A dark theme for web content is preferred.static final int
A light theme for web content is preferred.static final int
The preferred color scheme will be based on system settings.static final Parcelable.Creator<GeckoRuntimeSettings>
static final int
Only allow HTTPS connections.static final int
Allow insecure connections in normal browsing, but only HTTPS in private browsing.static final int
Web content is always isolated into its own `webIsolated` content process based on site-origin, and will only load in a shared `web` content process if site-origin could not be determined.static final int
Only isolates web content loaded by sites which are considered "high value".static final int
All web content is loaded into a shared `web` content process.static final int
Off by choice.static final int
First.static final int
Off (default).static final int
Only.Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets whether about:config is enabled or not.int
Get whether and where insecure (non-HTTPS) connections are allowed.String[]
Get the custom Gecko process arguments.boolean
Get whether or not the font sizes for web content are automatically adjusted to match the device's system font scale setting.Path to configuration file from which GeckoView will read configuration options such as Gecko process arguments, environment variables, and preferences.boolean
Get whether or not web console messages are sent to logcat.boolean
Get whether the cookie behavior opt-in partitioning is enabled.boolean
Get whether the cookie behavior opt-in partitioning in private browsing mode is enabled.Retrieve the status of the disable session history in parent (SHIP) preference.Gets the display density override value.Gets the display DPI override value.boolean
Gets whether double-tap zooming is enabled.boolean
Gets whether the Enteprise Roots feature is enabled or not.Get theExperimentDelegate
instance set on this runtime, if any,Get the crash threshold before spawning is disabled for the remote extensions process.Get the timeframe in milliseconds for the threshold before spawning is disabled for the remote extensions process.Get whether Extensions Process support is enabled.boolean
Gets whether the Add-on Manager web API (`mozAddonManager`) is enabled.Get the custom Gecko intent extras.boolean
Get whether to use fdlibm for Math.sin, Math.cos, and Math.tan.boolean
Get whether network.fetchpriority.enabled is enabled.boolean
Get whether Fingerprint protection is enabled in all tabs.Get Fingerprint protection overrides.boolean
Get whether Fingerprint protection is enabled private browsing mode.Gets whether fission is enabled or not.boolean
Get whether or not font inflation for non mobile-friendly pages is currently enabled.float
Gets the currently applied font size factor.boolean
Gets whether accessibility is force enabled or not.boolean
Gets whether or not force user scalable zooming should be enabled or not.int
Gets the current WebGL MSAA level.boolean
Get whether or not Global Privacy Control is currently enabled for normal tabs.boolean
Get whether or not Global Privacy Control is currently enabled for private tabs.boolean
Gets whether auto-zoom to editable fields is enabled.boolean
Get whether JavaScript support is enabled.int
Get the factor by which to increase the keepalive timeout when the NS_HTTP_LARGE_KEEPALIVE flag is used for a connection.String[]
Gets the list of requested locales.boolean
Get whether login form autofill is enabled.boolean
Get whether javascript.options.mem.gc_parallel_marking is enabled.boolean
Gets whether the pause-for-debugger is enabled or not.int
Gets the preferred color scheme override for web content.boolean
Get whether remote debugging support is enabled.Gets the screen size override value.boolean
Get whether automatic popups for translations is enabled.Get the DNS-over-HTTPS (DoH) server URI.int
Get whether and how DNS-over-HTTPS (Trusted Recursive Resolver) is configured.boolean
Gets whether the compositor should use the maximum screen depth when rendering.int
Get the current user characteristic ping version.Get the strategy used to control how sites are isolated into separate processes when Fission is enabled.boolean
Get whether web fonts support is enabled.boolean
Get whether or not Web Manifest processing support is enabled.void
readFromParcel
(Parcel source) setAboutConfigEnabled
(boolean flag) Sets whether or not about:config should be enabled.setAllowInsecureConnections
(int level) Set whether and where insecure (non-HTTPS) connections are allowed.setAutomaticFontSizeAdjustment
(boolean enabled) Set whether or not font sizes in web content should be automatically scaled according to the device's current system font scale setting.setConsoleOutputEnabled
(boolean enabled) Set whether or not web console messages should go to logcat.setCookieBehaviorOptInPartitioning
(boolean enabled) Set the pref to control the cookie behavior opt-in partitioning.setCookieBehaviorOptInPartitioningPBM
(boolean enabled) Set the pref to control the cookie behavior opt-in partitioning in private browsing mode.setDoubleTapZoomingEnabled
(boolean flag) Sets whether double tap zooming is enabled.setEnterpriseRootsEnabled
(boolean enabled) Enable the Enteprise Roots feature.setExtensionsProcessCrashThreshold
(Integer crashThreshold) Set the crash threshold before disabling spawning of the extensions remote process.setExtensionsProcessCrashTimeframe
(Long timeframeMs) Set the timeframe for the extensions process crash threshold.setExtensionsProcessEnabled
(boolean flag) Set whether Extensions Process support should be enabled.setExtensionsWebAPIEnabled
(boolean flag) Sets whether the Add-on Manager web API (`mozAddonManager`) is enabled.setFdlibmMathEnabled
(boolean enabled) Set the pref to control whether to use fdlibm for Math.sin, Math.cos, and Math.tan.setFetchPriorityEnabled
(boolean enabled) Set the pref to control whether network.fetchpriority.enabled is enabled.setFingerprintingProtection
(boolean enabled) Set the Fingerprint protection in all tabs.setFingerprintingProtectionOverrides
(String overrides) Set the Fingerprint protection overridessetFingerprintingProtectionPrivateBrowsing
(boolean enabled) Set the Fingerprint protection in private tabs.setFontInflationEnabled
(boolean enabled) Set whether or not font inflation for non mobile-friendly pages should be enabled.setFontSizeFactor
(float fontSizeFactor) Set a font size factor that will operate as a global text zoom.setForceEnableAccessibility
(boolean value) Sets whether accessibility is force enabled or not.setForceUserScalableEnabled
(boolean flag) Sets whether or not pinch-zooming should be enabled whenuser-scalable=no
is set on the viewport.setGlMsaaLevel
(int level) Sets the WebGL MSAA level.setGlobalPrivacyControl
(boolean enabled) Enable the Global Privacy Control Feature.setInputAutoZoomEnabled
(boolean flag) Set whether auto-zoom to editable fields should be enabled.setJavaScriptEnabled
(boolean flag) Set whether JavaScript support should be enabled.setLargeKeepaliveFactor
(int factor) Set the factor by which to increase the keepalive timeout when the NS_HTTP_LARGE_KEEPALIVE flag is used for a connection.void
setLocales
(String[] requestedLocales) Set the locale.setLoginAutofillEnabled
(boolean enabled) Set whether login forms should be filled automatically if only one viable candidate is provided viaonLoginFetch
.setParallelMarkingEnabled
(boolean enabled) Set the pref to control whether javascript.options.mem.gc_parallel_marking is enabled.setPreferredColorScheme
(int scheme) Sets the preferred color scheme override for web content.setRemoteDebuggingEnabled
(boolean enabled) Set whether remote debugging support should be enabled.setTranslationsOfferPopup
(boolean enabled) Set whether automatic popups should appear for offering translations on candidate pages.setTrustedRecursiveResolverMode
(int mode) Set whether and how DNS-over-HTTPS (Trusted Recursive Resolver) is configured.Set the DNS-over-HTTPS server URI.setUserCharacteristicPingCurrentVersion
(int version) Set the current user characteristic ping version.setWebContentIsolationStrategy
(Integer strategy) Set the strategy used to control how sites are isolated into separate processes when Fission is enabled.setWebFontsEnabled
(boolean flag) Set whether support for web fonts should be enabled.setWebManifestEnabled
(boolean enabled) Sets whether Web Manifest processing support is enabled.void
writeToParcel
(Parcel out, int flags) Methods inherited from class org.mozilla.geckoview.RuntimeSettings
describeContents, updatePrefs
-
Field Details
-
COLOR_SCHEME_LIGHT
public static final int COLOR_SCHEME_LIGHTA light theme for web content is preferred.- See Also:
-
COLOR_SCHEME_DARK
public static final int COLOR_SCHEME_DARKA dark theme for web content is preferred.- See Also:
-
COLOR_SCHEME_SYSTEM
public static final int COLOR_SCHEME_SYSTEMThe preferred color scheme will be based on system settings.- See Also:
-
STRATEGY_ISOLATE_NOTHING
public static final int STRATEGY_ISOLATE_NOTHINGAll web content is loaded into a shared `web` content process. This is similar to the non-Fission behaviour, however remote subframes may still be used for sites with special isolation behaviour, such as extension or mozillaweb content processes.- See Also:
-
STRATEGY_ISOLATE_EVERYTHING
public static final int STRATEGY_ISOLATE_EVERYTHINGWeb content is always isolated into its own `webIsolated` content process based on site-origin, and will only load in a shared `web` content process if site-origin could not be determined.- See Also:
-
STRATEGY_ISOLATE_HIGH_VALUE
public static final int STRATEGY_ISOLATE_HIGH_VALUEOnly isolates web content loaded by sites which are considered "high value". A site is considered "high value" if it has been granted a `highValue*` permission by the permission manager, which is done in response to certain actions.- See Also:
-
ALLOW_ALL
public static final int ALLOW_ALLAllow all insecure connections- See Also:
-
HTTPS_ONLY_PRIVATE
public static final int HTTPS_ONLY_PRIVATEAllow insecure connections in normal browsing, but only HTTPS in private browsing.- See Also:
-
HTTPS_ONLY
public static final int HTTPS_ONLYOnly allow HTTPS connections.- See Also:
-
TRR_MODE_OFF
public static final int TRR_MODE_OFFOff (default). Use native DNS resolution by default.- See Also:
-
TRR_MODE_FIRST
public static final int TRR_MODE_FIRSTFirst. Use TRR first, and only if the name resolve fails use the native resolver as a fallback.- See Also:
-
TRR_MODE_ONLY
public static final int TRR_MODE_ONLYOnly. Only use TRR, never use the native resolver.- See Also:
-
TRR_MODE_DISABLED
public static final int TRR_MODE_DISABLEDOff by choice. This is the same as 0 but marks it as done by choice and not done by default.- See Also:
-
CREATOR
-
-
Method Details
-
getContentBlocking
-
getRuntime
-
getArguments
Get the custom Gecko process arguments.- Returns:
- The Gecko process arguments.
-
getExtras
Get the custom Gecko intent extras.- Returns:
- The Gecko intent extras.
-
getConfigFilePath
Path to configuration file from which GeckoView will read configuration options such as Gecko process arguments, environment variables, and preferences.Note: this feature is only available for
.Build.VERSION.SDK_INT
> 21- Returns:
- Path to configuration file from which GeckoView will read configuration options, or
null
for default location/data/local/tmp/$PACKAGE-geckoview-config.yaml
.
-
getJavaScriptEnabled
public boolean getJavaScriptEnabled()Get whether JavaScript support is enabled.- Returns:
- Whether JavaScript support is enabled.
-
setJavaScriptEnabled
Set whether JavaScript support should be enabled.- Parameters:
flag
- A flag determining whether JavaScript should be enabled.- Returns:
- This GeckoRuntimeSettings instance.
-
setGlobalPrivacyControl
Enable the Global Privacy Control Feature.Note: Global Privacy Control is always enabled in private mode.
- Parameters:
enabled
- A flag determining whether GPC should be enabled.- Returns:
- This GeckoRuntimeSettings instance
-
setFingerprintingProtection
Set the Fingerprint protection in all tabs.- Parameters:
enabled
- Whether we set the pref to true or false- Returns:
- This GeckoRuntimeSettings instance
-
setFingerprintingProtectionPrivateBrowsing
Set the Fingerprint protection in private tabs.- Parameters:
enabled
- Whether we set the pref to true or false- Returns:
- This GeckoRuntimeSettings instance
-
setFingerprintingProtectionOverrides
@NonNull public GeckoRuntimeSettings setFingerprintingProtectionOverrides(@NonNull String overrides) Set the Fingerprint protection overrides- Parameters:
overrides
- The overrides value to add or remove fingerprinting protection targets. Please check RFPTargets.inc for all supported targets.- Returns:
- This GeckoRuntimeSettings instance
-
setFdlibmMathEnabled
Set the pref to control whether to use fdlibm for Math.sin, Math.cos, and Math.tan.- Parameters:
enabled
- Whether we set the pref to true or false- Returns:
- This GeckoRuntimeSettings instance
-
getFingerprintingProtection
public boolean getFingerprintingProtection()Get whether Fingerprint protection is enabled in all tabs.- Returns:
- Whether Fingerprint protection is enabled in all tabs.
-
getFingerprintingProtectionPrivateBrowsing
public boolean getFingerprintingProtectionPrivateBrowsing()Get whether Fingerprint protection is enabled private browsing mode.- Returns:
- Whether Fingerprint protection is enabled private browsing mode.
-
getFingerprintingProtectionOverrides
Get Fingerprint protection overrides.- Returns:
- The string of the fingerprinting protection overrides.
-
getFdlibmMathEnabled
public boolean getFdlibmMathEnabled()Get whether to use fdlibm for Math.sin, Math.cos, and Math.tan.- Returns:
- Whether the fdlibm is used
-
setCookieBehaviorOptInPartitioning
Set the pref to control the cookie behavior opt-in partitioning.- Parameters:
enabled
- Whether we set the pref to true or false- Returns:
- This GeckoRuntimeSettings instance
-
setCookieBehaviorOptInPartitioningPBM
Set the pref to control the cookie behavior opt-in partitioning in private browsing mode.- Parameters:
enabled
- Whether we set the pref to true or false- Returns:
- This GeckoRuntimeSettings instance
-
getCookieBehaviorOptInPartitioning
public boolean getCookieBehaviorOptInPartitioning()Get whether the cookie behavior opt-in partitioning is enabled.- Returns:
- Whether the cookie behavior opt-in partitioning is enabled.
-
getCookieBehaviorOptInPartitioningPBM
public boolean getCookieBehaviorOptInPartitioningPBM()Get whether the cookie behavior opt-in partitioning in private browsing mode is enabled.- Returns:
- Whether the cookie behavior opt-in partitioning in private browsing mode is enabled.
-
getExtensionsProcessEnabled
Get whether Extensions Process support is enabled.- Returns:
- Whether Extensions Process support is enabled.
-
setExtensionsProcessEnabled
Set whether Extensions Process support should be enabled.- Parameters:
flag
- A flag determining whether Extensions Process support should be enabled.- Returns:
- This GeckoRuntimeSettings instance.
-
getExtensionsProcessCrashThreshold
Get the crash threshold before spawning is disabled for the remote extensions process.- Returns:
- the crash threshold
-
getExtensionsProcessCrashTimeframe
Get the timeframe in milliseconds for the threshold before spawning is disabled for the remote extensions process.- Returns:
- the timeframe in milliseconds for the crash threshold
-
setExtensionsProcessCrashThreshold
@NonNull public GeckoRuntimeSettings setExtensionsProcessCrashThreshold(@NonNull Integer crashThreshold) Set the crash threshold before disabling spawning of the extensions remote process.- Parameters:
crashThreshold
- max crashes allowed- Returns:
- This GeckoRuntimeSettings instance.
-
setExtensionsProcessCrashTimeframe
Set the timeframe for the extensions process crash threshold. Any crashes older than the current time minus the timeframe are not included in the crash count.- Parameters:
timeframeMs
- time in milliseconds- Returns:
- This GeckoRuntimeSettings instance.
-
setFetchPriorityEnabled
Set the pref to control whether network.fetchpriority.enabled is enabled.- Parameters:
enabled
- Whether to enable the Fetch Priority feature- Returns:
- This GeckoRuntimeSettings instance
-
getFetchPriorityEnabled
public boolean getFetchPriorityEnabled()Get whether network.fetchpriority.enabled is enabled.- Returns:
- Whether Fetch Priority is enabled
-
setParallelMarkingEnabled
Set the pref to control whether javascript.options.mem.gc_parallel_marking is enabled.- Parameters:
enabled
- Whether to enable the JS GC Parallel Marking feature. This feature is purely a performance feature and should have no noticeable behavior change for the user.- Returns:
- This GeckoRuntimeSettings instance
-
getParallelMarkingEnabled
public boolean getParallelMarkingEnabled()Get whether javascript.options.mem.gc_parallel_marking is enabled.- Returns:
- Whether Parallel Marking is enabled
-
getRemoteDebuggingEnabled
public boolean getRemoteDebuggingEnabled()Get whether remote debugging support is enabled.- Returns:
- True if remote debugging support is enabled.
-
setRemoteDebuggingEnabled
Set whether remote debugging support should be enabled.- Parameters:
enabled
- True if remote debugging should be enabled.- Returns:
- This GeckoRuntimeSettings instance.
-
getWebFontsEnabled
public boolean getWebFontsEnabled()Get whether web fonts support is enabled.- Returns:
- Whether web fonts support is enabled.
-
setWebFontsEnabled
Set whether support for web fonts should be enabled.- Parameters:
flag
- A flag determining whether web fonts should be enabled.- Returns:
- This GeckoRuntimeSettings instance.
-
getPauseForDebuggerEnabled
public boolean getPauseForDebuggerEnabled()Gets whether the pause-for-debugger is enabled or not.- Returns:
- True if the pause is enabled.
-
getForceEnableAccessibility
public boolean getForceEnableAccessibility()Gets whether accessibility is force enabled or not.- Returns:
- true if accessibility is force enabled.
-
setForceEnableAccessibility
Sets whether accessibility is force enabled or not.Useful when testing accessibility.
- Parameters:
value
- whether accessibility is force enabled or not- Returns:
- this GeckoRuntimeSettings instance.
-
getUseMaxScreenDepth
public boolean getUseMaxScreenDepth()Gets whether the compositor should use the maximum screen depth when rendering.- Returns:
- True if the maximum screen depth should be used.
-
getDisplayDensityOverride
Gets the display density override value.- Returns:
- Returns a positive number. Will return null if not set.
-
getDisplayDpiOverride
Gets the display DPI override value.- Returns:
- Returns a positive number. Will return null if not set.
-
getCrashHandler
-
getScreenSizeOverride
Gets the screen size override value.- Returns:
- Returns a Rect containing the dimensions to use for the window size. Will return null if not set.
-
getLocales
Gets the list of requested locales.- Returns:
- A list of locale codes in Gecko format ("en" or "en-US").
-
setLocales
Set the locale.- Parameters:
requestedLocales
- An ordered list of locales in Gecko format ("en-US").
-
getExtensionsWebAPIEnabled
public boolean getExtensionsWebAPIEnabled()Gets whether the Add-on Manager web API (`mozAddonManager`) is enabled.- Returns:
- True when the web API is enabled, false otherwise.
-
getGlobalPrivacyControl
public boolean getGlobalPrivacyControl()Get whether or not Global Privacy Control is currently enabled for normal tabs.- Returns:
- True if GPC is enabled in normal tabs.
-
getGlobalPrivacyControlPrivateMode
public boolean getGlobalPrivacyControlPrivateMode()Get whether or not Global Privacy Control is currently enabled for private tabs.- Returns:
- True if GPC is enabled in private tabs.
-
setExtensionsWebAPIEnabled
Sets whether the Add-on Manager web API (`mozAddonManager`) is enabled.- Parameters:
flag
- True if the web API should be enabled, false otherwise.- Returns:
- This GeckoRuntimeSettings instance.
-
setWebManifestEnabled
Sets whether Web Manifest processing support is enabled.- Parameters:
enabled
- A flag determining whether Web Manifest processing support is enabled.- Returns:
- This GeckoRuntimeSettings instance.
-
getWebManifestEnabled
public boolean getWebManifestEnabled()Get whether or not Web Manifest processing support is enabled.- Returns:
- True if web manifest processing support is enabled.
-
setConsoleOutputEnabled
Set whether or not web console messages should go to logcat.Note: If enabled, Gecko performance may be negatively impacted if content makes heavy use of the console API.
- Parameters:
enabled
- A flag determining whether or not web console messages should be printed to logcat.- Returns:
- This GeckoRuntimeSettings instance.
-
getConsoleOutputEnabled
public boolean getConsoleOutputEnabled()Get whether or not web console messages are sent to logcat.- Returns:
- True if console output is enabled.
-
setAutomaticFontSizeAdjustment
Set whether or not font sizes in web content should be automatically scaled according to the device's current system font scale setting. Enabling this will prevent modification of thefont size factor
. Disabling this setting will restore the previously used value for thefont size factor
.- Parameters:
enabled
- A flag determining whether or not font sizes should be scaled automatically to match the device's system font scale.- Returns:
- This GeckoRuntimeSettings instance.
-
getAutomaticFontSizeAdjustment
public boolean getAutomaticFontSizeAdjustment()Get whether or not the font sizes for web content are automatically adjusted to match the device's system font scale setting.- Returns:
- True if font sizes are automatically adjusted.
-
setFontSizeFactor
Set a font size factor that will operate as a global text zoom. All font sizes will be multiplied by this factor.The default factor is 1.0.
Currently, any changes only take effect after a reload of the session.
This setting cannot be modified while
automatic font size adjustment
is enabled.- Parameters:
fontSizeFactor
- The factor to be used for scaling all text. Setting a value of 0 disables both this feature andfont inflation
.- Returns:
- This GeckoRuntimeSettings instance.
-
setEnterpriseRootsEnabled
Enable the Enteprise Roots feature.When Enabled, GeckoView will fetch the third-party root certificates added to the Android OS CA store and will use them internally.
- Parameters:
enabled
- Whether to enable this feature or not.- Returns:
- This GeckoRuntimeSettings instance.
-
getEnterpriseRootsEnabled
public boolean getEnterpriseRootsEnabled()Gets whether the Enteprise Roots feature is enabled or not.- Returns:
- true if the feature is enabled, false otherwise.
-
getFontSizeFactor
public float getFontSizeFactor()Gets the currently applied font size factor.- Returns:
- The currently applied font size factor.
-
setFontInflationEnabled
Set whether or not font inflation for non mobile-friendly pages should be enabled. The default value of this setting isfalse
.When enabled, font sizes will be increased on all pages that are lacking a <meta> viewport tag and have been loaded in a session using
GeckoSessionSettings.VIEWPORT_MODE_MOBILE
. To improve readability, the font inflation logic will attempt to increase font sizes for the main text content of the page only.The magnitude of font inflation applied depends on the
font size factor
currently in use.Currently, any changes only take effect after a reload of the session.
- Parameters:
enabled
- A flag determining whether or not font inflation should be enabled.- Returns:
- This GeckoRuntimeSettings instance.
-
getFontInflationEnabled
public boolean getFontInflationEnabled()Get whether or not font inflation for non mobile-friendly pages is currently enabled.- Returns:
- True if font inflation is enabled.
-
getPreferredColorScheme
public int getPreferredColorScheme()Gets the preferred color scheme override for web content.- Returns:
- One of the
COLOR_SCHEME_*
constants.
-
setPreferredColorScheme
Sets the preferred color scheme override for web content.- Parameters:
scheme
- The preferred color scheme. Must be one of theCOLOR_SCHEME_*
constants.- Returns:
- This GeckoRuntimeSettings instance.
-
getInputAutoZoomEnabled
public boolean getInputAutoZoomEnabled()Gets whether auto-zoom to editable fields is enabled.- Returns:
- True if auto-zoom is enabled, false otherwise.
-
setInputAutoZoomEnabled
Set whether auto-zoom to editable fields should be enabled.- Parameters:
flag
- True if auto-zoom should be enabled, false otherwise.- Returns:
- This GeckoRuntimeSettings instance.
-
getDoubleTapZoomingEnabled
public boolean getDoubleTapZoomingEnabled()Gets whether double-tap zooming is enabled.- Returns:
- True if double-tap zooming is enabled, false otherwise.
-
setDoubleTapZoomingEnabled
Sets whether double tap zooming is enabled.- Parameters:
flag
- true if double tap zooming should be enabled, false otherwise.- Returns:
- This GeckoRuntimeSettings instance.
-
getGlMsaaLevel
public int getGlMsaaLevel()Gets the current WebGL MSAA level.- Returns:
- number of MSAA samples, 0 if MSAA is disabled.
-
setGlMsaaLevel
Sets the WebGL MSAA level.- Parameters:
level
- number of MSAA samples, 0 if MSAA should be disabled.- Returns:
- This GeckoRuntimeSettings instance.
-
getExperimentDelegate
Get theExperimentDelegate
instance set on this runtime, if any,- Returns:
- The
ExperimentDelegate
set on this runtime.
-
getAboutConfigEnabled
public boolean getAboutConfigEnabled()Gets whether about:config is enabled or not.- Returns:
- True if about:config is enabled, false otherwise.
-
setAboutConfigEnabled
Sets whether or not about:config should be enabled. This is a page that allows users to directly modify Gecko preferences. Modification of some preferences may cause the app to break in unpredictable ways -- crashes, performance issues, security vulnerabilities, etc.- Parameters:
flag
- True if about:config should be enabled, false otherwise.- Returns:
- This GeckoRuntimeSettings instance.
-
getWebContentIsolationStrategy
Get the strategy used to control how sites are isolated into separate processes when Fission is enabled. This pref has no effect if Fission is disabled.Setting should conform to
GeckoRuntimeSettings.WebContentIsolationStrategy
, but is not automatically mapped.- Returns:
- The web content isolation strategy.
-
setWebContentIsolationStrategy
Set the strategy used to control how sites are isolated into separate processes when Fission is enabled. This pref has no effect if Fission is disabled.Setting must conform to
GeckoRuntimeSettings.WebContentIsolationStrategy
options.- Parameters:
strategy
- The specified strategy defined byGeckoRuntimeSettings.WebContentIsolationStrategy
.- Returns:
- This GeckoRuntimeSettings instance.
-
getForceUserScalableEnabled
public boolean getForceUserScalableEnabled()Gets whether or not force user scalable zooming should be enabled or not.- Returns:
- True if force user scalable zooming should be enabled, false otherwise.
-
setForceUserScalableEnabled
Sets whether or not pinch-zooming should be enabled whenuser-scalable=no
is set on the viewport.- Parameters:
flag
- True if force user scalable zooming should be enabled, false otherwise.- Returns:
- This GeckoRuntimeSettings instance.
-
getLoginAutofillEnabled
public boolean getLoginAutofillEnabled()Get whether login form autofill is enabled.- Returns:
- True if login autofill is enabled.
-
getFissionEnabled
Gets whether fission is enabled or not. Note: There is no setter after startup. SeeGeckoRuntimeSettings.Builder.fissionEnabled(boolean)
for setting.- Returns:
- True if fission is enabled or false otherwise.
-
setTranslationsOfferPopup
Set whether automatic popups should appear for offering translations on candidate pages.- Parameters:
enabled
- A flag determining whether automatic offer popups should be enabled for translations.- Returns:
- The builder instance.
-
getTranslationsOfferPopup
public boolean getTranslationsOfferPopup()Get whether automatic popups for translations is enabled.- Returns:
- True if login automatic popups for translations are enabled.
-
setLoginAutofillEnabled
Set whether login forms should be filled automatically if only one viable candidate is provided viaonLoginFetch
.- Parameters:
enabled
- A flag determining whether login autofill should be enabled.- Returns:
- The builder instance.
-
getAllowInsecureConnections
public int getAllowInsecureConnections()Get whether and where insecure (non-HTTPS) connections are allowed.- Returns:
- One of the
HttpsOnlyMode
constants.
-
setAllowInsecureConnections
Set whether and where insecure (non-HTTPS) connections are allowed.- Parameters:
level
- One of theHttpsOnlyMode
constants.- Returns:
- This GeckoRuntimeSettings instance.
-
getTrustedRecusiveResolverMode
public int getTrustedRecusiveResolverMode()Get whether and how DNS-over-HTTPS (Trusted Recursive Resolver) is configured.- Returns:
- One of the
TrustedRecursiveResolverMode
constants.
-
getLargeKeepaliveFactor
@NonNull public int getLargeKeepaliveFactor()Get the factor by which to increase the keepalive timeout when the NS_HTTP_LARGE_KEEPALIVE flag is used for a connection.- Returns:
- An integer factor.
-
setTrustedRecursiveResolverMode
Set whether and how DNS-over-HTTPS (Trusted Recursive Resolver) is configured.- Parameters:
mode
- One of theTrustedRecursiveResolverMode
constants.- Returns:
- This GeckoRuntimeSettings instance.
-
setLargeKeepaliveFactor
Set the factor by which to increase the keepalive timeout when the NS_HTTP_LARGE_KEEPALIVE flag is used for a connection.- Parameters:
factor
- FACTOR by which to increase the keepalive timeout.- Returns:
- This GeckoRuntimeSettings instance.
-
getTrustedRecursiveResolverUri
Get the DNS-over-HTTPS (DoH) server URI.- Returns:
- URI of the DoH server.
-
setTrustedRecursiveResolverUri
Set the DNS-over-HTTPS server URI.- Parameters:
uri
- URI of the DNS-over-HTTPS server.- Returns:
- This GeckoRuntimeSettings instance.
-
getUserCharacteristicPingCurrentVersion
@NonNull public int getUserCharacteristicPingCurrentVersion()Get the current user characteristic ping version.- Returns:
- The current version.
-
setUserCharacteristicPingCurrentVersion
Set the current user characteristic ping version.- Parameters:
version
- The version number.- Returns:
- This GeckoRuntimeSettings instance.
-
getDisableShip
Retrieve the status of the disable session history in parent (SHIP) preference. May be null if the value hasn't been specifically initialized.Note, there is no conventional setter because this may only be set before Gecko is initialized.
Set before initialization using
GeckoRuntimeSettings.Builder.disableShip(boolean)
.- Returns:
- True if SHIP is disabled, false if SHIP is enabled.
-
writeToParcel
- Specified by:
writeToParcel
in interfaceParcelable
- Overrides:
writeToParcel
in classRuntimeSettings
-
readFromParcel
- Overrides:
readFromParcel
in classRuntimeSettings
-