Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83d73c2e authored by Torne (Richard Coles)'s avatar Torne (Richard Coles)
Browse files

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
parent d1d54a14
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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();
    }
+11 −0
Original line number Diff line number Diff line
@@ -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;