summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebViewDelegate.java
diff options
context:
space:
mode:
authorAnna Malova <amalova@google.com>2021-01-29 14:35:43 +0000
committerAnna Malova <amalova@google.com>2021-01-29 14:44:04 +0000
commit416a99d69bf6d8920b559f4dee92742b231f61a2 (patch)
tree4978bcc93b42781541b3d077e9a4e279d2748504 /core/java/android/webkit/WebViewDelegate.java
parent322819916e87d944de29947703d7456930505162 (diff)
Record WebView startup timestamps and add API to access them.
This change records timestamps that happen before the WebView APK's code is loaded and can record timestamps itself. Bug: 177895749 Test: n/a Change-Id: Ibb832fa13e868846625cc02c584a535a11561c66
Diffstat (limited to 'core/java/android/webkit/WebViewDelegate.java')
-rw-r--r--core/java/android/webkit/WebViewDelegate.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebViewDelegate.java b/core/java/android/webkit/WebViewDelegate.java
index 950dc7300ba9..c7eac6c72936 100644
--- a/core/java/android/webkit/WebViewDelegate.java
+++ b/core/java/android/webkit/WebViewDelegate.java
@@ -218,4 +218,15 @@ public final class WebViewDelegate {
public String getDataDirectorySuffix() {
return WebViewFactory.getDataDirectorySuffix();
}
+
+ /**
+ * Returns an array of startup timestamps. For the specification of array
+ * see {@link WebViewFactory.Timestamp}.
+ * This method must be called on the same thread where the
+ * WebViewChromiumFactoryProvider#create method was invoked.
+ */
+ @NonNull
+ public long[] getTimestamps() {
+ return WebViewFactory.getTimestamps();
+ }
}