Fixed
Status Update
Comments
mg...@google.com <mg...@google.com>
ap...@google.com <ap...@google.com> #2
Note for dev team to check: If this isn't an error, CameraX should not log.
pr...@google.com <pr...@google.com> #3
Hello,
Thanks for filing this issue, this issue can be safely ignored - we have a todo for removing unnecessarily logging. This should be fixed shortly.
If there are other issues, please let us know.
Description
We can solve it by following the approach from `DisposableEffect` and `LaunchedEffect`, and including a function without the keys parameters with a deprecated with error:
```
private const val LaunchedEffectNoParamError =
"LaunchedEffect must provide one or more 'key' parameters that define the identity of " +
"the LaunchedEffect and determine when its previous effect coroutine should be cancelled " +
"and a new effect launched for the new key."
// This deprecated-error function shadows the varargs overload so that the varargs version
// is not used without key parameters.
@Deprecated(LaunchedEffectNoParamError, level = DeprecationLevel.ERROR)
@Suppress("DeprecatedCallableAddReplaceWith", "UNUSED_PARAMETER")
@Composable
fun LaunchedEffect(
block: suspend CoroutineScope.() -> Unit
): Unit = error(LaunchedEffectNoParamError)
```