Document WebViewDelegate.getTimestamps() better.

Specify that the values are @ElapsedRealtimeLong and document the
entries in the array via the index constants.

Fixes: 184786485
Bug: 184026615
Test: n/a
Change-Id: I26e3df80e79b14d2301e28da93f7814bc67bdb6a
This commit is contained in:
Torne (Richard Coles)
2021-04-27 13:58:49 -04:00
parent d1d54a14ef
commit 83d73c2eb4
2 changed files with 13 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
package android.webkit;
import android.annotation.ElapsedRealtimeLong;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
@@ -226,6 +227,7 @@ public final class WebViewDelegate {
* WebViewChromiumFactoryProvider#create method was invoked.
*/
@NonNull
@ElapsedRealtimeLong
public long[] getTimestamps() {
return WebViewFactory.getTimestamps();
}

View File

@@ -83,16 +83,27 @@ public final class WebViewFactory {
public @interface Timestamp {
}
/** When the overall WebView provider load began. */
public static final int WEBVIEW_LOAD_START = 0;
/** Before creating the WebView APK Context. */
public static final int CREATE_CONTEXT_START = 1;
/** After creating the WebView APK Context. */
public static final int CREATE_CONTEXT_END = 2;
/** Before adding WebView assets to AssetManager. */
public static final int ADD_ASSETS_START = 3;
/** After adding WebView assets to AssetManager. */
public static final int ADD_ASSETS_END = 4;
/** Before creating the WebView ClassLoader. */
public static final int GET_CLASS_LOADER_START = 5;
/** After creating the WebView ClassLoader. */
public static final int GET_CLASS_LOADER_END = 6;
/** Before preloading the WebView native library. */
public static final int NATIVE_LOAD_START = 7;
/** After preloading the WebView native library. */
public static final int NATIVE_LOAD_END = 8;
/** Before looking up the WebView provider class. */
public static final int PROVIDER_CLASS_FOR_NAME_START = 9;
/** After looking up the WebView provider class. */
public static final int PROVIDER_CLASS_FOR_NAME_END = 10;
private static final int TIMESTAMPS_SIZE = 11;