WebViewStartUpResult
@WebViewCompat.ExperimentalAsyncStartUp
interface WebViewStartUpResult
Result object associated with onSuccess.
Summary
Public functions |
|
|---|---|
Long? |
The maximum time taken by a task among all the tasks associated with WebView startup in the UI thread. |
(Mutable)List<StartUpLocation!>? |
Code locations where WebView startup blocked a non-UI thread. |
Long? |
The total time WebView startup took on the UI thread. |
(Mutable)List<StartUpLocation!>? |
Code locations where WebView startup completely blocked the UI thread. |
Public functions
getMaxTimePerTaskInUiThreadMillis
fun getMaxTimePerTaskInUiThreadMillis(): Long?
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
fun getNonUiThreadBlockingStartUpLocations(): (Mutable)List<StartUpLocation!>?
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
fun getTotalTimeInUiThreadMillis(): Long?
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
fun getUiThreadBlockingStartUpLocations(): (Mutable)List<StartUpLocation!>?
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.