Skip to content

Commit 08d7f7e

Browse files
authored
Resolve ambiguity for Color with named imports (#670)
Resolves an import ambiguity by specifying `ComposeColor` and `AndroidColor` type aliases in the Imagen snippets. This change also cleans up unused imports and alphabetizes the remaining ones.
1 parent 1af16bc commit 08d7f7e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

misc/src/main/java/com/example/snippets/ai/ImagenSnippets.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ import com.google.firebase.ai.type.ImagenAspectRatio
5757
import com.google.firebase.ai.type.ImagenBackgroundMask
5858
import com.google.firebase.ai.type.ImagenControlReference
5959
import com.google.firebase.ai.type.ImagenControlType
60-
import com.google.firebase.ai.type.ImagenEditingConfig
6160
import com.google.firebase.ai.type.ImagenEditMode
61+
import com.google.firebase.ai.type.ImagenEditingConfig
6262
import com.google.firebase.ai.type.ImagenGenerationConfig
6363
import com.google.firebase.ai.type.ImagenGenerationResponse
6464
import com.google.firebase.ai.type.ImagenImageFormat
@@ -170,6 +170,8 @@ suspend fun removeBallFromImage(
170170
// [END android_imagen_inpaint_removal]
171171

172172
// [START android_imagen_editing_mask_editor]
173+
//import androidx.compose.ui.graphics.Color as ComposeColor
174+
173175
@Composable
174176
fun ImagenEditingMaskEditor(
175177
sourceBitmap: Bitmap,
@@ -260,6 +262,9 @@ fun ImagenEditingMaskEditor(
260262
// [END android_imagen_editing_mask_editor]
261263

262264
// [START android_imagen_editing_create_mask]
265+
// import android.graphics.Color as AndroidColor
266+
// import android.graphics.Paint
267+
263268
private fun createMaskBitmap(
264269
sourceBitmap: Bitmap,
265270
paths: SnapshotStateList<Path>,

0 commit comments

Comments
 (0)