Skip to content

Commit 399c5c5

Browse files
committed
Remove isRecording from constructor
It's an internal tracker that should not be modified while instantiating.
1 parent e8495d5 commit 399c5c5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ internal constructor(
102102
return if (receivedJson.contains("setupComplete")) {
103103
LiveSession(
104104
session = webSession,
105-
backgroundDispatcher = backgroundDispatcher,
106-
isRecording = false
105+
backgroundDispatcher = backgroundDispatcher
107106
)
108107
} else {
109108
webSession.close()

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ public class LiveSession
4444
internal constructor(
4545
private val session: ClientWebSocketSession?,
4646
@Background private val backgroundDispatcher: CoroutineContext,
47-
private var isRecording: Boolean,
4847
private var audioHelper: AudioHelper? = null
4948
) {
5049

5150
private val audioQueue = ConcurrentLinkedQueue<ByteArray>()
5251
private val playBackQueue = ConcurrentLinkedQueue<ByteArray>()
5352
private var startedReceiving = false
5453
private var receiveChannel: Channel<Frame> = Channel()
54+
private var isRecording: Boolean = false
5555

5656
private companion object {
5757
val TAG = LiveSession::class.java.simpleName

0 commit comments

Comments
 (0)