From 754967740801b8f30c094f37d0e89765c3be7af9 Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Thu, 7 Sep 2023 14:56:49 -0700 Subject: [PATCH] Internal update PiperOrigin-RevId: 563553758 --- .../tasks/vision/imagegenerator/ImageGenerator.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/imagegenerator/ImageGenerator.java b/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/imagegenerator/ImageGenerator.java index 91218922f..73a205044 100644 --- a/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/imagegenerator/ImageGenerator.java +++ b/mediapipe/tasks/java/com/google/mediapipe/tasks/vision/imagegenerator/ImageGenerator.java @@ -44,7 +44,6 @@ import com.google.mediapipe.tasks.vision.imagegenerator.proto.ImageGeneratorGrap import com.google.mediapipe.tasks.vision.imagesegmenter.ImageSegmenter.ImageSegmenterOptions; import com.google.mediapipe.tasks.vision.imagesegmenter.proto.ImageSegmenterGraphOptionsProto.ImageSegmenterGraphOptions; import com.google.protobuf.Any; -import com.google.protobuf.ExtensionRegistryLite; import com.google.protobuf.InvalidProtocolBufferException; import java.util.ArrayList; import java.util.Arrays; @@ -566,14 +565,13 @@ public final class ImageGenerator extends BaseVisionTaskApi { /** Converts an {@link ImageGeneratorOptions} to a {@link Any} protobuf message. */ @Override + @SuppressWarnings("ProtoParseWithRegistry") public Any convertToAnyProto() { ImageGeneratorGraphOptionsProto.ImageGeneratorGraphOptions.Builder taskOptionsBuilder = ImageGeneratorGraphOptionsProto.ImageGeneratorGraphOptions.newBuilder(); if (conditionOptions != null && conditionOptions.isPresent()) { try { - taskOptionsBuilder.mergeFrom( - conditionOptions.get().convertToAnyProto().getValue(), - ExtensionRegistryLite.getGeneratedRegistry()); + taskOptionsBuilder.mergeFrom(conditionOptions.get().convertToAnyProto().getValue()); } catch (InvalidProtocolBufferException e) { Log.e(TAG, "Error converting ConditionOptions to proto. " + e.getMessage()); e.printStackTrace();