Skip to content

Commit ab359fb

Browse files
committed
Update LiveSessionFutures.kt
1 parent e38febd commit ab359fb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public abstract class LiveSessionFutures internal constructor() {
5555
* Starts an audio conversation with the model, which can only be stopped using
5656
* [stopAudioConversation].
5757
*/
58+
@RequiresPermission(RECORD_AUDIO)
5859
public abstract fun startAudioConversation(): ListenableFuture<Unit>
5960

6061
/**
@@ -64,6 +65,7 @@ public abstract class LiveSessionFutures internal constructor() {
6465
*
6566
* If there is no audio conversation currently active, this function does nothing.
6667
*/
68+
@RequiresPermission(RECORD_AUDIO)
6769
public abstract fun stopAudioConversation(): ListenableFuture<Unit>
6870

6971
/**
@@ -163,6 +165,7 @@ public abstract class LiveSessionFutures internal constructor() {
163165
functionCallHandler: ((FunctionCallPart) -> FunctionResponsePart)?
164166
) = SuspendToFutureAdapter.launchFuture { session.startAudioConversation(functionCallHandler) }
165167

168+
@RequiresPermission(RECORD_AUDIO)
166169
override fun startAudioConversation() =
167170
SuspendToFutureAdapter.launchFuture { session.startAudioConversation() }
168171

0 commit comments

Comments
 (0)