Add KDoc to the features/rageshake API interfaces

Document RageshakeFeatureAvailability, LogFilesRemover and the BugReporter
interface, and complete the docs of its remaining members.

The BugReporter doc records that progress and the outcome arrive through the
listener passed to sendBugReport rather than through a return value or an
exception.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benoit Marty
2026-08-14 11:48:59 +02:00
parent 57658640e1
commit c4c7dac9cf
3 changed files with 18 additions and 2 deletions
@@ -10,6 +10,10 @@ package io.element.android.features.rageshake.api
import kotlinx.coroutines.flow.Flow
/**
* Tells whether bug reporting is available, which an enterprise deployment can turn off.
*/
fun interface RageshakeFeatureAvailability {
/** Whether the rageshake and bug report entry points should be offered to the user. */
fun isAvailable(): Flow<Boolean>
}
@@ -10,6 +10,9 @@ package io.element.android.features.rageshake.api.logs
import java.io.File
/**
* Deletes the log files the app writes, used to keep them from growing without bound and to clear them on request.
*/
interface LogFilesRemover {
/**
* Perform the log files removal.
@@ -10,6 +10,11 @@ package io.element.android.features.rageshake.api.reporter
import java.io.File
/**
* Uploads bug reports, including the log files the app has been writing.
*
* Progress and the outcome are reported through the listener passed to [sendBugReport] rather than by returning or throwing.
*/
interface BugReporter {
/**
* Send a bug report.
@@ -35,17 +40,21 @@ interface BugReporter {
)
/**
* Provide the log directory.
* Provide the log directory, i.e. where the rotating log files are written.
*/
fun logDirectory(): File
/**
* Set the current tracing log level.
* Set the current tracing log level, so it can be reported alongside the bug.
*
* @param logLevel the log level currently in effect.
*/
fun setCurrentTracingLogLevel(logLevel: String)
/**
* Save the logcat.
*
* @return the file the logcat was written to, or `null` when it could not be captured.
*/
fun saveLogCat(): File?
}