Class ShadowAlwaysOnHotwordDetector

java.lang.Object
org.robolectric.shadows.ShadowAlwaysOnHotwordDetector

@Implements(value=android.service.voice.AlwaysOnHotwordDetector.class, isInAndroidSdk=false) public class ShadowAlwaysOnHotwordDetector extends Object
Shadow implementation of AlwaysOnHotwordDetector.
  • Constructor Details

    • ShadowAlwaysOnHotwordDetector

      public ShadowAlwaysOnHotwordDetector()
  • Method Details

    • __constructor__

      @Implementation(maxSdk=29) protected void __constructor__(String text, Locale locale, AlwaysOnHotwordDetector.Callback callback, android.hardware.soundtrigger.KeyphraseEnrollmentInfo keyphraseEnrollmentInfo, IVoiceInteractionService voiceInteractionService, com.android.internal.app.IVoiceInteractionManagerService modelManagementService)
    • __constructor__

      @Implementation(minSdk=30, maxSdk=30) protected void __constructor__(String text, Locale locale, AlwaysOnHotwordDetector.Callback callback, android.hardware.soundtrigger.KeyphraseEnrollmentInfo keyphraseEnrollmentInfo, com.android.internal.app.IVoiceInteractionManagerService modelManagementService)
    • __constructor__

      @Implementation(minSdk=31, maxSdk=33) protected void __constructor__(String text, Locale locale, AlwaysOnHotwordDetector.Callback callback, android.hardware.soundtrigger.KeyphraseEnrollmentInfo keyphraseEnrollmentInfo, com.android.internal.app.IVoiceInteractionManagerService modelManagementService, int targetSdkVersion, boolean supportHotwordDetectionService, PersistableBundle options, SharedMemory sharedMemory)
    • __constructor__

      @Implementation(minSdk=34, maxSdk=34) protected void __constructor__(String text, Locale locale, Executor executor, AlwaysOnHotwordDetector.Callback callback, android.hardware.soundtrigger.KeyphraseEnrollmentInfo keyphraseEnrollmentInfo, com.android.internal.app.IVoiceInteractionManagerService modelManagementService, int targetSdkVersion, boolean supportSandboxedDetectionService)
    • triggerOnErrorCallback

      public void triggerOnErrorCallback()
      Invokes Callback#onError.
    • triggerOnDetectedCallback

      public void triggerOnDetectedCallback(AlwaysOnHotwordDetector.EventPayload eventPayload)
      Invokes Callback#onDetected.
    • triggerOnAvailabilityChangedCallback

      public void triggerOnAvailabilityChangedCallback(int status)
      Invokes Callback#onAvailabilityChanged.
    • createEventPayload

      public static AlwaysOnHotwordDetector.EventPayload createEventPayload(boolean triggerAvailable, boolean captureAvailable, AudioFormat audioFormat, int captureSession, byte[] data)
      Invokes the normally hidden EventPayload constructor for passing to Callback#onDetected().