jni-android-sys 0.0.10

Autogenerated glue code for access Android JVM APIs from Rust
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


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

        /// [presentPrompt](https://developer.android.com/reference/android/security/ConfirmationPrompt.html#presentPrompt(java.util.concurrent.Executor,%20android.security.ConfirmationCallback))
        ///
        /// Required features: "android-security-ConfirmationCallback", "java-util-concurrent-Executor"
        #[cfg(any(feature = "all", all(feature = "android-security-ConfirmationCallback", feature = "java-util-concurrent-Executor")))]
        pub fn presentPrompt<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::concurrent::Executor>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::security::ConfirmationCallback>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/security/ConfirmationPrompt", java.flags == PUBLIC, .name == "presentPrompt", .descriptor == "(Ljava/util/concurrent/Executor;Landroid/security/ConfirmationCallback;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/ConfirmationPrompt\0", "presentPrompt\0", "(Ljava/util/concurrent/Executor;Landroid/security/ConfirmationCallback;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [cancelPrompt](https://developer.android.com/reference/android/security/ConfirmationPrompt.html#cancelPrompt())
        pub fn cancelPrompt<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/security/ConfirmationPrompt", java.flags == PUBLIC, .name == "cancelPrompt", .descriptor == "()V"
            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/security/ConfirmationPrompt\0", "cancelPrompt\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isSupported](https://developer.android.com/reference/android/security/ConfirmationPrompt.html#isSupported(android.content.Context))
        ///
        /// Required features: "android-content-Context"
        #[cfg(any(feature = "all", all(feature = "android-content-Context")))]
        pub fn isSupported<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::Context>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/security/ConfirmationPrompt", java.flags == PUBLIC | STATIC, .name == "isSupported", .descriptor == "(Landroid/content/Context;)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("android/security/ConfirmationPrompt\0", "isSupported\0", "(Landroid/content/Context;)Z\0");
                __jni_env.call_static_boolean_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}