# LocalCallSilenceExtension

Artifact: [androidx.core:core-telecom](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/telecom/extensions/LocalCallSilenceExtension.kt+class:androidx.core.telecom.extensions.LocalCallSilenceExtension) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***


```
interface LocalCallSilenceExtension
```

<br />

*** ** * ** ***

Add support for this remote surface to display information related to the local call silence state for this call.

Local Call Silence means that the call should be silenced at the application layer (local silence) instead of the hardware layer (global silence). Using a local call silence over global silence is advantageous when the application wants to still receive the audio input data while not transmitting audio input data to remote users. This allows applications to do stuff like nudge the user when they are silenced but talking into the microphone.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/ExtensionInitializationScope#addLocalCallSilenceExtension(kotlin.Boolean,kotlin.Boolean,kotlin.coroutines.SuspendFunction1)` |   |

## Summary

| ### Public functions |
|---|---|
| `suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/LocalCallSilenceExtension#updateCanUserUpdateSilence(kotlin.Boolean)(canUserUpdateSilence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Updates whether the user is allowed to change the silence state on remote surfaces. |
| `suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/telecom/extensions/LocalCallSilenceExtension#updateIsLocallySilenced(kotlin.Boolean)(isSilenced: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Update all of the remote surfaces that the local call silence state of this call has changed. |

## Public functions

### updateCanUserUpdateSilence

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
suspend fun updateCanUserUpdateSilence(canUserUpdateSilence: Boolean): Unit
```

Updates whether the user is allowed to change the silence state on remote surfaces. This should be set to 'false' when the user is in a state where audio input is disabled by the a moderator or the environment (e.g. hardware limitations).

| Parameters |
|---|---|
| `canUserUpdateSilence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if the user can toggle silence, false if the control should be disabled. |

### updateIsLocallySilenced

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
suspend fun updateIsLocallySilenced(isSilenced: Boolean): Unit
```

Update all of the remote surfaces that the local call silence state of this call has changed.

| Parameters |
|---|---|
| `isSilenced: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | The new local call silence state associated with this call. |