WebViewStartUpResult


@WebViewCompat.ExperimentalAsyncStartUp
public interface WebViewStartUpResult


Result object associated with onSuccess.

Summary

Public methods

abstract @Nullable Long

The maximum time taken by a task among all the tasks associated with WebView startup in the UI thread.

abstract @Nullable List<StartUpLocation>

Code locations where WebView startup blocked a non-UI thread.

abstract @Nullable Long

The total time WebView startup took on the UI thread.

abstract @Nullable List<StartUpLocation>

Code locations where WebView startup completely blocked the UI thread.

Public methods

getMaxTimePerTaskInUiThreadMillis

Added in 1.13.0
abstract @Nullable Long getMaxTimePerTaskInUiThreadMillis()

The maximum time taken by a task among all the tasks associated with WebView startup in the UI thread.

The return value will be null if the underlying WebView version doesn't support this method.

getNonUiThreadBlockingStartUpLocations

abstract @Nullable List<StartUpLocationgetNonUiThreadBlockingStartUpLocations()

Code locations where WebView startup blocked a non-UI thread.

This is as a debug tool to enable apps to catch code locations where WebView is started up or is about to be started up such that it blocks a non-UI thread.

Example code location: A `WebSettings.getDefaultUserAgent()` call on a background thread before calling any other API that triggers WebView startup.

The list will be chronologically ordered based on the time of creation of the stacktrace.

The return value will be null if the underlying WebView version doesn't support this method.

getTotalTimeInUiThreadMillis

Added in 1.13.0
abstract @Nullable Long getTotalTimeInUiThreadMillis()

The total time WebView startup took on the UI thread.

The return value will be null if the underlying WebView version doesn't support this method.

getUiThreadBlockingStartUpLocations

abstract @Nullable List<StartUpLocationgetUiThreadBlockingStartUpLocations()

Code locations where WebView startup completely blocked the UI thread.

This is as a debug tool to enable apps to catch code locations where WebView is suboptimally started up even when startUpWebView is used.

Example code location: A `new WebView()` call on the Android main looper before calling any other API that triggers WebView startup.

The list will be chronologically ordered based on the time of creation of the stacktrace.

The return value will be null if the underlying WebView version doesn't support this method.