diff options
| author | Tim Volodine <timvolodine@google.com> | 2018-04-04 17:49:28 +0100 |
|---|---|---|
| committer | Tim Volodine <timvolodine@google.com> | 2018-04-11 02:48:56 +0100 |
| commit | 90980b42080c88b0b31ccbbbe1760037b26de8f7 (patch) | |
| tree | c0056cf79d8da6acd78467df7b97327bbf07c699 /core/java/android/webkit/TracingController.java | |
| parent | e5f9e833e5c8860ad7c07ee7808dedc7c1ab8ae9 (diff) | |
[WebView Tracing API] documentation fixes.
Some fixes to the WebView Tracing API related documentation.
In particular this patch makes sure that:
- the defaults are correct,
- the examples are correct,
- the formatting is ok,
- the text for parameters etc.. is formatted consistently,
- the documentation is spellchecked and typos corrected.
BUG: 63750258
Test: manual inspection of the generated html documentation
Change-Id: I53ac1a1d003e519739464b8d8554f3d8262c46e4
Diffstat (limited to 'core/java/android/webkit/TracingController.java')
| -rw-r--r-- | core/java/android/webkit/TracingController.java | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/core/java/android/webkit/TracingController.java b/core/java/android/webkit/TracingController.java index 50068f5abfb2..05c0304e042c 100644 --- a/core/java/android/webkit/TracingController.java +++ b/core/java/android/webkit/TracingController.java @@ -35,9 +35,9 @@ import java.util.concurrent.Executor; * Example usage: * <pre class="prettyprint"> * TracingController tracingController = TracingController.getInstance(); - * tracingController.start(new TraceConfig.Builder() + * tracingController.start(new TracingConfig.Builder() * .addCategories(CATEGORIES_WEB_DEVELOPER).build()); - * [..] + * ... * tracingController.stop(new FileOutputStream("trace.json"), * Executors.newSingleThreadExecutor()); * </pre></p> @@ -49,7 +49,7 @@ public abstract class TracingController { * only one TracingController instance for all WebView instances, * however this restriction may be relaxed in a future Android release. * - * @return the default TracingController instance + * @return The default TracingController instance. */ @NonNull public static TracingController getInstance() { @@ -65,8 +65,10 @@ public abstract class TracingController { * using an internal buffer and flushed to the outputStream when * {@link #stop(OutputStream, Executor)} is called. * - * @param tracingConfig configuration options to use for tracing - * @throws IllegalStateException if the system is already tracing. + * @param tracingConfig Configuration options to use for tracing. + * @throws IllegalStateException If the system is already tracing. + * @throws IllegalArgumentException If the configuration is invalid (e.g. + * invalid category pattern or invalid tracing mode). */ public abstract void start(@NonNull TracingConfig tracingConfig); @@ -77,17 +79,22 @@ public abstract class TracingController { * in chunks by invoking {@link java.io.OutputStream#write(byte[])}. On completion * the {@link java.io.OutputStream#close()} method is called. * - * @param outputStream the output steam the tracing data will be sent to. If null + * @param outputStream The output stream the tracing data will be sent to. If null * the tracing data will be discarded. - * @param executor the {@link java.util.concurrent.Executor} on which the - * outputStream #write and #close methods will be invoked. - * @return false if the system was not tracing at the time of the call, true - * otherwise. + * @param executor The {@link java.util.concurrent.Executor} on which the + * outputStream {@link java.io.OutputStream#write(byte[])} and + * {@link java.io.OutputStream#close()} methods will be invoked. + * @return False if the WebView framework was not tracing at the time of the call, + * true otherwise. */ public abstract boolean stop(@Nullable OutputStream outputStream, @NonNull @CallbackExecutor Executor executor); - /** True if the system is tracing */ + /** + * Returns whether the WebView framework is tracing. + * + * @return True if tracing is enabled. + */ public abstract boolean isTracing(); } |
