1 /* 2 * Copyright 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package androidx.core.telecom.extensions 18 19 import androidx.core.telecom.util.ExperimentalAppActions 20 21 /** 22 * Add support for this remote surface to display information related to the local call silence 23 * state for this call. 24 * 25 * Local Call Silence means that the call should be silenced at the application layer (local 26 * silence) instead of the hardware layer (global silence). Using a local call silence over global 27 * silence is advantageous when the application wants to still receive the audio input data while 28 * not transmitting audio input data to remote users. This allows applications to do stuff like 29 * nudge the user when they are silenced but talking into the microphone. 30 * 31 * @see ExtensionInitializationScope.addLocalCallSilenceExtension 32 */ 33 @ExperimentalAppActions 34 public interface LocalCallSilenceExtension { 35 /** 36 * Update all of the remote surfaces that the local call silence state of this call has changed. 37 * 38 * @param isSilenced The new local call silence state associated with this call. 39 */ updateIsLocallySilencednull40 public suspend fun updateIsLocallySilenced(isSilenced: Boolean) 41 } 42