1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "android-service-voice-AlwaysOnHotwordDetector"))]
__jni_bindgen! {
    /// public class [AlwaysOnHotwordDetector](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html)
    ///
    /// Required feature: "android-service-voice-AlwaysOnHotwordDetector"
    public class AlwaysOnHotwordDetector ("android/service/voice/AlwaysOnHotwordDetector") extends crate::java::lang::Object {

        /// [getSupportedRecognitionModes](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#getSupportedRecognitionModes())
        pub fn getSupportedRecognitionModes<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/service/voice/AlwaysOnHotwordDetector", java.flags == PUBLIC, .name == "getSupportedRecognitionModes", .descriptor == "()I"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/service/voice/AlwaysOnHotwordDetector\0", "getSupportedRecognitionModes\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [startRecognition](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#startRecognition(int))
        pub fn startRecognition<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/service/voice/AlwaysOnHotwordDetector", java.flags == PUBLIC, .name == "startRecognition", .descriptor == "(I)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/service/voice/AlwaysOnHotwordDetector\0", "startRecognition\0", "(I)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [stopRecognition](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#stopRecognition())
        pub fn stopRecognition<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/service/voice/AlwaysOnHotwordDetector", java.flags == PUBLIC, .name == "stopRecognition", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/service/voice/AlwaysOnHotwordDetector\0", "stopRecognition\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [createEnrollIntent](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#createEnrollIntent())
        ///
        /// Required features: "android-content-Intent"
        #[cfg(any(feature = "all", all(feature = "android-content-Intent")))]
        pub fn createEnrollIntent<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::content::Intent>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/service/voice/AlwaysOnHotwordDetector", java.flags == PUBLIC, .name == "createEnrollIntent", .descriptor == "()Landroid/content/Intent;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/service/voice/AlwaysOnHotwordDetector\0", "createEnrollIntent\0", "()Landroid/content/Intent;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [createUnEnrollIntent](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#createUnEnrollIntent())
        ///
        /// Required features: "android-content-Intent"
        #[cfg(any(feature = "all", all(feature = "android-content-Intent")))]
        pub fn createUnEnrollIntent<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::content::Intent>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/service/voice/AlwaysOnHotwordDetector", java.flags == PUBLIC, .name == "createUnEnrollIntent", .descriptor == "()Landroid/content/Intent;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/service/voice/AlwaysOnHotwordDetector\0", "createUnEnrollIntent\0", "()Landroid/content/Intent;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [createReEnrollIntent](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#createReEnrollIntent())
        ///
        /// Required features: "android-content-Intent"
        #[cfg(any(feature = "all", all(feature = "android-content-Intent")))]
        pub fn createReEnrollIntent<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::content::Intent>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/service/voice/AlwaysOnHotwordDetector", java.flags == PUBLIC, .name == "createReEnrollIntent", .descriptor == "()Landroid/content/Intent;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/service/voice/AlwaysOnHotwordDetector\0", "createReEnrollIntent\0", "()Landroid/content/Intent;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// public static final [RECOGNITION_FLAG_ALLOW_MULTIPLE_TRIGGERS](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#RECOGNITION_FLAG_ALLOW_MULTIPLE_TRIGGERS)
        pub const RECOGNITION_FLAG_ALLOW_MULTIPLE_TRIGGERS : i32 = 2;

        /// public static final [RECOGNITION_FLAG_CAPTURE_TRIGGER_AUDIO](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#RECOGNITION_FLAG_CAPTURE_TRIGGER_AUDIO)
        pub const RECOGNITION_FLAG_CAPTURE_TRIGGER_AUDIO : i32 = 1;

        /// public static final [RECOGNITION_MODE_USER_IDENTIFICATION](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#RECOGNITION_MODE_USER_IDENTIFICATION)
        pub const RECOGNITION_MODE_USER_IDENTIFICATION : i32 = 2;

        /// public static final [RECOGNITION_MODE_VOICE_TRIGGER](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#RECOGNITION_MODE_VOICE_TRIGGER)
        pub const RECOGNITION_MODE_VOICE_TRIGGER : i32 = 1;

        /// public static final [STATE_HARDWARE_UNAVAILABLE](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#STATE_HARDWARE_UNAVAILABLE)
        pub const STATE_HARDWARE_UNAVAILABLE : i32 = -2;

        /// public static final [STATE_KEYPHRASE_ENROLLED](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#STATE_KEYPHRASE_ENROLLED)
        pub const STATE_KEYPHRASE_ENROLLED : i32 = 2;

        /// public static final [STATE_KEYPHRASE_UNENROLLED](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#STATE_KEYPHRASE_UNENROLLED)
        pub const STATE_KEYPHRASE_UNENROLLED : i32 = 1;

        /// public static final [STATE_KEYPHRASE_UNSUPPORTED](https://developer.android.com/reference/android/service/voice/AlwaysOnHotwordDetector.html#STATE_KEYPHRASE_UNSUPPORTED)
        pub const STATE_KEYPHRASE_UNSUPPORTED : i32 = -1;
    }
}