summaryrefslogtreecommitdiff
path: root/android/webkit/TracingController.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/webkit/TracingController.java')
-rw-r--r--android/webkit/TracingController.java29
1 files changed, 18 insertions, 11 deletions
diff --git a/android/webkit/TracingController.java b/android/webkit/TracingController.java
index 50068f5a..05c0304e 100644
--- a/android/webkit/TracingController.java
+++ b/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();
}