Skip to content

Commit 95f3692

Browse files
committed
Formatting... again.
1 parent 23c48ee commit 95f3692

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ internal constructor(
9898
public suspend fun startAudioConversation(
9999
functionCallHandler: ((FunctionCallPart) -> FunctionResponsePart)? = null
100100
) {
101-
if (context.checkSelfPermission(Manifest.permission.RECORD_AUDIO) !=
101+
if (
102+
context.checkSelfPermission(Manifest.permission.RECORD_AUDIO) !=
102103
PackageManager.PERMISSION_GRANTED
103104
) {
104105
throw PermissionMissingException("Missing RECORD_AUDIO")

firebase-ai/src/test/java/com/google/firebase/ai/type/LiveSessionTest.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ class LiveSessionTest {
6363
@Test
6464
fun `startAudioConversation with RECORD_AUDIO permission proceeds normally`() = runTest {
6565
// Arrange
66-
`when`(
67-
mockContext.checkSelfPermission(Manifest.permission.RECORD_AUDIO)
68-
)
66+
`when`(mockContext.checkSelfPermission(Manifest.permission.RECORD_AUDIO))
6967
.thenReturn(PackageManager.PERMISSION_GRANTED)
7068

7169
// Act & Assert
@@ -77,9 +75,7 @@ class LiveSessionTest {
7775
fun `startAudioConversation without RECORD_AUDIO permission throws PermissionMissingException`() =
7876
runTest {
7977
// Arrange
80-
`when`(
81-
mockContext.checkSelfPermission(Manifest.permission.RECORD_AUDIO)
82-
)
78+
`when`(mockContext.checkSelfPermission(Manifest.permission.RECORD_AUDIO))
8379
.thenReturn(PackageManager.PERMISSION_DENIED)
8480

8581
// Act & Assert

0 commit comments

Comments
 (0)