Add nullable annotation to AudioDataProducer#setAudioConsumer

PiperOrigin-RevId: 526697945
This commit is contained in:
MediaPipe Team 2023-04-24 11:06:16 -07:00 committed by Copybara-Service
parent 61854dc6a3
commit ceb911ae06
2 changed files with 7 additions and 2 deletions

View File

@ -14,8 +14,10 @@
package com.google.mediapipe.components; package com.google.mediapipe.components;
import javax.annotation.Nullable;
/** Lightweight abstraction for an object that can produce audio data. */ /** Lightweight abstraction for an object that can produce audio data. */
public interface AudioDataProducer { public interface AudioDataProducer {
/** Set the consumer that receives the audio data from this producer. */ /** Set the consumer that receives the audio data from this producer. */
void setAudioConsumer(AudioDataConsumer consumer); void setAudioConsumer(@Nullable AudioDataConsumer consumer);
} }

View File

@ -71,7 +71,10 @@ android_library(
"AudioDataProducer.java", "AudioDataProducer.java",
], ],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = ["@maven//:com_google_guava_guava"], deps = [
"@maven//:com_google_code_findbugs_jsr305",
"@maven//:com_google_guava_guava",
],
) )
# MicrophoneHelper that provides access to audio data from a microphone # MicrophoneHelper that provides access to audio data from a microphone