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-content-pm-LauncherApps"))]
__jni_bindgen! {
    /// public class [LauncherApps](https://developer.android.com/reference/android/content/pm/LauncherApps.html)
    ///
    /// Required feature: "android-content-pm-LauncherApps"
    public class LauncherApps ("android/content/pm/LauncherApps") extends crate::java::lang::Object {

        /// [getActivityList](https://developer.android.com/reference/android/content/pm/LauncherApps.html#getActivityList(java.lang.String,%20android.os.UserHandle))
        ///
        /// Required features: "android-os-UserHandle", "java-lang-String", "java-util-List"
        #[cfg(any(feature = "all", all(feature = "android-os-UserHandle", feature = "java-lang-String", feature = "java-util-List")))]
        pub fn getActivityList<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::UserHandle>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::List>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/LauncherApps", java.flags == PUBLIC, .name == "getActivityList", .descriptor == "(Ljava/lang/String;Landroid/os/UserHandle;)Ljava/util/List;"
            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/content/pm/LauncherApps\0", "getActivityList\0", "(Ljava/lang/String;Landroid/os/UserHandle;)Ljava/util/List;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [resolveActivity](https://developer.android.com/reference/android/content/pm/LauncherApps.html#resolveActivity(android.content.Intent,%20android.os.UserHandle))
        ///
        /// Required features: "android-content-Intent", "android-content-pm-LauncherActivityInfo", "android-os-UserHandle"
        #[cfg(any(feature = "all", all(feature = "android-content-Intent", feature = "android-content-pm-LauncherActivityInfo", feature = "android-os-UserHandle")))]
        pub fn resolveActivity<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::Intent>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::UserHandle>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::content::pm::LauncherActivityInfo>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/LauncherApps", java.flags == PUBLIC, .name == "resolveActivity", .descriptor == "(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/pm/LauncherActivityInfo;"
            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/content/pm/LauncherApps\0", "resolveActivity\0", "(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/pm/LauncherActivityInfo;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [startMainActivity](https://developer.android.com/reference/android/content/pm/LauncherApps.html#startMainActivity(android.content.ComponentName,%20android.os.UserHandle,%20android.graphics.Rect,%20android.os.Bundle))
        ///
        /// Required features: "android-content-ComponentName", "android-graphics-Rect", "android-os-Bundle", "android-os-UserHandle"
        #[cfg(any(feature = "all", all(feature = "android-content-ComponentName", feature = "android-graphics-Rect", feature = "android-os-Bundle", feature = "android-os-UserHandle")))]
        pub fn startMainActivity<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::ComponentName>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::UserHandle>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::graphics::Rect>>, arg3: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Bundle>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/LauncherApps", java.flags == PUBLIC, .name == "startMainActivity", .descriptor == "(Landroid/content/ComponentName;Landroid/os/UserHandle;Landroid/graphics/Rect;Landroid/os/Bundle;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into()), __jni_bindgen::AsJValue::as_jvalue(&arg3.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/content/pm/LauncherApps\0", "startMainActivity\0", "(Landroid/content/ComponentName;Landroid/os/UserHandle;Landroid/graphics/Rect;Landroid/os/Bundle;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [startAppDetailsActivity](https://developer.android.com/reference/android/content/pm/LauncherApps.html#startAppDetailsActivity(android.content.ComponentName,%20android.os.UserHandle,%20android.graphics.Rect,%20android.os.Bundle))
        ///
        /// Required features: "android-content-ComponentName", "android-graphics-Rect", "android-os-Bundle", "android-os-UserHandle"
        #[cfg(any(feature = "all", all(feature = "android-content-ComponentName", feature = "android-graphics-Rect", feature = "android-os-Bundle", feature = "android-os-UserHandle")))]
        pub fn startAppDetailsActivity<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::ComponentName>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::UserHandle>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::graphics::Rect>>, arg3: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Bundle>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/LauncherApps", java.flags == PUBLIC, .name == "startAppDetailsActivity", .descriptor == "(Landroid/content/ComponentName;Landroid/os/UserHandle;Landroid/graphics/Rect;Landroid/os/Bundle;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into()), __jni_bindgen::AsJValue::as_jvalue(&arg3.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/content/pm/LauncherApps\0", "startAppDetailsActivity\0", "(Landroid/content/ComponentName;Landroid/os/UserHandle;Landroid/graphics/Rect;Landroid/os/Bundle;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isPackageEnabled](https://developer.android.com/reference/android/content/pm/LauncherApps.html#isPackageEnabled(java.lang.String,%20android.os.UserHandle))
        ///
        /// Required features: "android-os-UserHandle", "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "android-os-UserHandle", feature = "java-lang-String")))]
        pub fn isPackageEnabled<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::UserHandle>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/LauncherApps", java.flags == PUBLIC, .name == "isPackageEnabled", .descriptor == "(Ljava/lang/String;Landroid/os/UserHandle;)Z"
            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/content/pm/LauncherApps\0", "isPackageEnabled\0", "(Ljava/lang/String;Landroid/os/UserHandle;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isActivityEnabled](https://developer.android.com/reference/android/content/pm/LauncherApps.html#isActivityEnabled(android.content.ComponentName,%20android.os.UserHandle))
        ///
        /// Required features: "android-content-ComponentName", "android-os-UserHandle"
        #[cfg(any(feature = "all", all(feature = "android-content-ComponentName", feature = "android-os-UserHandle")))]
        pub fn isActivityEnabled<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::ComponentName>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::UserHandle>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/LauncherApps", java.flags == PUBLIC, .name == "isActivityEnabled", .descriptor == "(Landroid/content/ComponentName;Landroid/os/UserHandle;)Z"
            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/content/pm/LauncherApps\0", "isActivityEnabled\0", "(Landroid/content/ComponentName;Landroid/os/UserHandle;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [registerCallback](https://developer.android.com/reference/android/content/pm/LauncherApps.html#registerCallback(android.content.pm.LauncherApps.Callback))
        ///
        /// Required features: "android-content-pm-LauncherApps_Callback"
        #[cfg(any(feature = "all", all(feature = "android-content-pm-LauncherApps_Callback")))]
        pub fn registerCallback_Callback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::pm::LauncherApps_Callback>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/LauncherApps", java.flags == PUBLIC, .name == "registerCallback", .descriptor == "(Landroid/content/pm/LauncherApps$Callback;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/content/pm/LauncherApps\0", "registerCallback\0", "(Landroid/content/pm/LauncherApps$Callback;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [registerCallback](https://developer.android.com/reference/android/content/pm/LauncherApps.html#registerCallback(android.content.pm.LauncherApps.Callback,%20android.os.Handler))
        ///
        /// Required features: "android-content-pm-LauncherApps_Callback", "android-os-Handler"
        #[cfg(any(feature = "all", all(feature = "android-content-pm-LauncherApps_Callback", feature = "android-os-Handler")))]
        pub fn registerCallback_Callback_Handler<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::pm::LauncherApps_Callback>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Handler>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/LauncherApps", java.flags == PUBLIC, .name == "registerCallback", .descriptor == "(Landroid/content/pm/LauncherApps$Callback;Landroid/os/Handler;)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/content/pm/LauncherApps\0", "registerCallback\0", "(Landroid/content/pm/LauncherApps$Callback;Landroid/os/Handler;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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