File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
main/kotlin/com/google/firebase/ai/type
test/java/com/google/firebase/ai/type Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff 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" )
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments