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

        /// [startMainActivity](https://developer.android.com/reference/android/content/pm/CrossProfileApps.html#startMainActivity(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 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>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/CrossProfileApps", java.flags == PUBLIC, .name == "startMainActivity", .descriptor == "(Landroid/content/ComponentName;Landroid/os/UserHandle;)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/CrossProfileApps\0", "startMainActivity\0", "(Landroid/content/ComponentName;Landroid/os/UserHandle;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getTargetUserProfiles](https://developer.android.com/reference/android/content/pm/CrossProfileApps.html#getTargetUserProfiles())
        ///
        /// Required features: "java-util-List"
        #[cfg(any(feature = "all", all(feature = "java-util-List")))]
        pub fn getTargetUserProfiles<'env>(&'env self) -> __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/CrossProfileApps", java.flags == PUBLIC, .name == "getTargetUserProfiles", .descriptor == "()Ljava/util/List;"
            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/content/pm/CrossProfileApps\0", "getTargetUserProfiles\0", "()Ljava/util/List;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getProfileSwitchingLabel](https://developer.android.com/reference/android/content/pm/CrossProfileApps.html#getProfileSwitchingLabel(android.os.UserHandle))
        ///
        /// Required features: "android-os-UserHandle", "java-lang-CharSequence"
        #[cfg(any(feature = "all", all(feature = "android-os-UserHandle", feature = "java-lang-CharSequence")))]
        pub fn getProfileSwitchingLabel<'env>(&'env self, arg0: 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::lang::CharSequence>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/CrossProfileApps", java.flags == PUBLIC, .name == "getProfileSwitchingLabel", .descriptor == "(Landroid/os/UserHandle;)Ljava/lang/CharSequence;"
            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/CrossProfileApps\0", "getProfileSwitchingLabel\0", "(Landroid/os/UserHandle;)Ljava/lang/CharSequence;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getProfileSwitchingIconDrawable](https://developer.android.com/reference/android/content/pm/CrossProfileApps.html#getProfileSwitchingIconDrawable(android.os.UserHandle))
        ///
        /// Required features: "android-graphics-drawable-Drawable", "android-os-UserHandle"
        #[cfg(any(feature = "all", all(feature = "android-graphics-drawable-Drawable", feature = "android-os-UserHandle")))]
        pub fn getProfileSwitchingIconDrawable<'env>(&'env self, arg0: 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::graphics::drawable::Drawable>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/content/pm/CrossProfileApps", java.flags == PUBLIC, .name == "getProfileSwitchingIconDrawable", .descriptor == "(Landroid/os/UserHandle;)Landroid/graphics/drawable/Drawable;"
            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/CrossProfileApps\0", "getProfileSwitchingIconDrawable\0", "(Landroid/os/UserHandle;)Landroid/graphics/drawable/Drawable;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}