#[rustfmt::skip] // This file has been automatically generated by `jnim` from `Activity.class`. // DO NOT EDIT use jnim::*; use crate::android::content::ComponentCallbacks; use crate::android::content::ComponentCallbacks2; use crate::android::content::ComponentCallbacks2Object; use crate::android::content::ComponentCallbacksObject; use crate::android::view::ContextThemeWrapper; use crate::android::view::KeyEventCallback; use crate::android::view::KeyEventCallbackObject; use crate::android::view::LayoutInflaterFactory; use crate::android::view::LayoutInflaterFactory2; use crate::android::view::LayoutInflaterFactory2Object; use crate::android::view::LayoutInflaterFactoryObject; use crate::android::view::ViewOnCreateContextMenuListener; use crate::android::view::ViewOnCreateContextMenuListenerObject; use crate::android::view::WindowCallback; use crate::android::view::WindowCallbackObject; pub struct Activity { __object: JObject, __supper: ContextThemeWrapper, __layout_inflater_factory2: LayoutInflaterFactory2Object, __layout_inflater_factory: LayoutInflaterFactoryObject, __window_callback: WindowCallbackObject, __key_event_callback: KeyEventCallbackObject, __view_on_create_context_menu_listener: ViewOnCreateContextMenuListenerObject, __component_callbacks2: ComponentCallbacks2Object, __component_callbacks: ComponentCallbacksObject, } impl JNameMaker for Activity { const JAVA_PATH: &'static [u8] = b"android/app/Activity\0"; } impl JPlainMarker for Activity { fn class(env: Option<&JEnv>) -> Option { static CACHE: CachedID = CachedID::new(); CACHE.get(|| JEnv::env(env)?.find_class(Self::JAVA_PATH)) } } impl core::ops::Deref for Activity { type Target = ContextThemeWrapper; fn deref(&self) -> &Self::Target { &self.__supper } } impl AsRef for Activity { fn as_ref(&self) -> &ContextThemeWrapper { &self.__supper } } impl AsRef for Activity { fn as_ref(&self) -> &JObject { &self.__object } } // impl interfaces impl LayoutInflaterFactory2 for Activity {} impl AsRef for Activity { fn as_ref(&self) -> &LayoutInflaterFactory2Object { &self.__layout_inflater_factory2 } } impl LayoutInflaterFactory for Activity {} impl AsRef for Activity { fn as_ref(&self) -> &LayoutInflaterFactoryObject { &self.__layout_inflater_factory } } impl WindowCallback for Activity {} impl AsRef for Activity { fn as_ref(&self) -> &WindowCallbackObject { &self.__window_callback } } impl KeyEventCallback for Activity {} impl AsRef for Activity { fn as_ref(&self) -> &KeyEventCallbackObject { &self.__key_event_callback } } impl ViewOnCreateContextMenuListener for Activity {} impl AsRef for Activity { fn as_ref(&self) -> &ViewOnCreateContextMenuListenerObject { &self.__view_on_create_context_menu_listener } } impl ComponentCallbacks2 for Activity {} impl AsRef for Activity { fn as_ref(&self) -> &ComponentCallbacks2Object { &self.__component_callbacks2 } } impl ComponentCallbacks for Activity {} impl AsRef for Activity { fn as_ref(&self) -> &ComponentCallbacksObject { &self.__component_callbacks } } // field impl Activity { pub const DEFAULT_KEYS_DIALER: i32 = 1i32; pub const DEFAULT_KEYS_DISABLE: i32 = 0i32; pub const DEFAULT_KEYS_SEARCH_GLOBAL: i32 = 4i32; pub const DEFAULT_KEYS_SEARCH_LOCAL: i32 = 3i32; pub const DEFAULT_KEYS_SHORTCUT: i32 = 2i32; pub const RESULT_CANCELED: i32 = 0i32; pub const RESULT_FIRST_USER: i32 = 1i32; pub const RESULT_OK: i32 = -1i32; } // method impl Activity { pub fn get_intent<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getIntent\0", b"()Landroid/content/Intent;\0"))? .call(env, self.as_ref(), ()) } pub fn set_intent<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setIntent\0", b"(Landroid/content/Intent;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_locus_context<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a crate::android::os::Bundle) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setLocusContext\0", b"(Landroid/content/LocusId;Landroid/os/Bundle;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn get_application<'a>(&'a self, env: &'a JEnv) -> Option<&'a crate::android::app::Application> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getApplication\0", b"()Landroid/app/Application;\0"))? .call(env, self.as_ref(), ()) } pub fn is_child<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isChild\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn get_parent<'a>(&'a self, env: &'a JEnv) -> Option<&'a crate::android::app::Activity> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getParent\0", b"()Landroid/app/Activity;\0"))? .call(env, self.as_ref(), ()) } pub fn get_window_manager<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getWindowManager\0", b"()Landroid/view/WindowManager;\0"))? .call(env, self.as_ref(), ()) } pub fn get_window<'a>(&'a self, env: &'a JEnv) -> Option<&'a crate::android::view::Window> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getWindow\0", b"()Landroid/view/Window;\0"))? .call(env, self.as_ref(), ()) } pub fn get_loader_manager<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getLoaderManager\0", b"()Landroid/app/LoaderManager;\0"))? .call(env, self.as_ref(), ()) } pub fn get_current_focus<'a>(&'a self, env: &'a JEnv) -> Option<&'a crate::android::view::View> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getCurrentFocus\0", b"()Landroid/view/View;\0"))? .call(env, self.as_ref(), ()) } pub fn attach_base_context<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::content::Context) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"attachBaseContext\0", b"(Landroid/content/Context;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn register_activity_lifecycle_callbacks<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"registerActivityLifecycleCallbacks\0", b"(Landroid/app/Application$ActivityLifecycleCallbacks;)V\0", ) })? .call(env, self.as_ref(), (arg0,)) } pub fn unregister_activity_lifecycle_callbacks<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"unregisterActivityLifecycleCallbacks\0", b"(Landroid/app/Application$ActivityLifecycleCallbacks;)V\0", ) })? .call(env, self.as_ref(), (arg0,)) } pub fn register_component_callbacks<'a>( &'a self, env: &'a JEnv, arg0: &'a crate::android::content::ComponentCallbacksObject, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"registerComponentCallbacks\0", b"(Landroid/content/ComponentCallbacks;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn unregister_component_callbacks<'a>( &'a self, env: &'a JEnv, arg0: &'a crate::android::content::ComponentCallbacksObject, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"unregisterComponentCallbacks\0", b"(Landroid/content/ComponentCallbacks;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_create<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::os::Bundle) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onCreate\0", b"(Landroid/os/Bundle;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn get_splash_screen<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getSplashScreen\0", b"()Landroid/window/SplashScreen;\0"))? .call(env, self.as_ref(), ()) } pub fn on_create_v2<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::os::Bundle, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onCreate\0", b"(Landroid/os/Bundle;Landroid/os/PersistableBundle;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_restore_instance_state<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::os::Bundle) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onRestoreInstanceState\0", b"(Landroid/os/Bundle;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_restore_instance_state_v2<'a>( &'a self, env: &'a JEnv, arg0: &'a crate::android::os::Bundle, arg1: &'a JObject, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onRestoreInstanceState\0", b"(Landroid/os/Bundle;Landroid/os/PersistableBundle;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_post_create<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::os::Bundle) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPostCreate\0", b"(Landroid/os/Bundle;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_post_create_v2<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::os::Bundle, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPostCreate\0", b"(Landroid/os/Bundle;Landroid/os/PersistableBundle;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_start<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onStart\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_restart<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onRestart\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_state_not_saved<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onStateNotSaved\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_resume<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onResume\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_post_resume<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPostResume\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_top_resumed_activity_changed<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onTopResumedActivityChanged\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn is_voice_interaction<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isVoiceInteraction\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn is_voice_interaction_root<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isVoiceInteractionRoot\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn get_voice_interactor<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getVoiceInteractor\0", b"()Landroid/app/VoiceInteractor;\0"))? .call(env, self.as_ref(), ()) } pub fn is_local_voice_interaction_supported<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isLocalVoiceInteractionSupported\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn start_local_voice_interaction<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::os::Bundle) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startLocalVoiceInteraction\0", b"(Landroid/os/Bundle;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_local_voice_interaction_started<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onLocalVoiceInteractionStarted\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_local_voice_interaction_stopped<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onLocalVoiceInteractionStopped\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn stop_local_voice_interaction<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"stopLocalVoiceInteraction\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_new_intent<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onNewIntent\0", b"(Landroid/content/Intent;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_save_instance_state<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::os::Bundle) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onSaveInstanceState\0", b"(Landroid/os/Bundle;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_save_instance_state_v2<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::os::Bundle, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onSaveInstanceState\0", b"(Landroid/os/Bundle;Landroid/os/PersistableBundle;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_pause<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPause\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_user_leave_hint<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onUserLeaveHint\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_create_thumbnail<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onCreateThumbnail\0", b"(Landroid/graphics/Bitmap;Landroid/graphics/Canvas;)Z\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_create_description<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onCreateDescription\0", b"()Ljava/lang/CharSequence;\0"))? .call(env, self.as_ref(), ()) } pub fn on_provide_assist_data<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::os::Bundle) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onProvideAssistData\0", b"(Landroid/os/Bundle;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_provide_assist_content<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onProvideAssistContent\0", b"(Landroid/app/assist/AssistContent;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_get_direct_actions<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onGetDirectActions\0", b"(Landroid/os/CancellationSignal;Ljava/util/function/Consumer;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_perform_direct_action<'a>( &'a self, env: &'a JEnv, arg0: &'a JString, arg1: &'a crate::android::os::Bundle, arg2: &'a JObject, arg3: &'a JObject, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onPerformDirectAction\0", b"(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;Ljava/util/function/Consumer;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3)) } pub fn request_show_keyboard_shortcuts<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"requestShowKeyboardShortcuts\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn dismiss_keyboard_shortcuts_helper<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"dismissKeyboardShortcutsHelper\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_provide_keyboard_shortcuts<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a JObject, arg2: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onProvideKeyboardShortcuts\0", b"(Ljava/util/List;Landroid/view/Menu;I)V\0"))? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn show_assist<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::os::Bundle) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"showAssist\0", b"(Landroid/os/Bundle;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_stop<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onStop\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_destroy<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onDestroy\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn report_fully_drawn<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"reportFullyDrawn\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_multi_window_mode_changed<'a>( &'a self, env: &'a JEnv, arg0: JBool, arg1: &'a crate::android::content::res::Configuration, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onMultiWindowModeChanged\0", b"(ZLandroid/content/res/Configuration;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_multi_window_mode_changed_v2<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onMultiWindowModeChanged\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn is_in_multi_window_mode<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isInMultiWindowMode\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn on_picture_in_picture_mode_changed<'a>( &'a self, env: &'a JEnv, arg0: JBool, arg1: &'a crate::android::content::res::Configuration, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onPictureInPictureModeChanged\0", b"(ZLandroid/content/res/Configuration;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_picture_in_picture_ui_state_changed<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onPictureInPictureUiStateChanged\0", b"(Landroid/app/PictureInPictureUiState;)V\0", ) })? .call(env, self.as_ref(), (arg0,)) } pub fn on_picture_in_picture_mode_changed_v2<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPictureInPictureModeChanged\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn is_in_picture_in_picture_mode<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isInPictureInPictureMode\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn enter_picture_in_picture_mode<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"enterPictureInPictureMode\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn enter_picture_in_picture_mode_v2<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"enterPictureInPictureMode\0", b"(Landroid/app/PictureInPictureParams;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_picture_in_picture_params<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setPictureInPictureParams\0", b"(Landroid/app/PictureInPictureParams;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn get_max_num_picture_in_picture_actions<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getMaxNumPictureInPictureActions\0", b"()I\0"))? .call(env, self.as_ref(), ()) } pub fn on_picture_in_picture_requested<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPictureInPictureRequested\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn set_should_dock_big_overlays<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setShouldDockBigOverlays\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn should_dock_big_overlays<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"shouldDockBigOverlays\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn on_configuration_changed<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::content::res::Configuration) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onConfigurationChanged\0", b"(Landroid/content/res/Configuration;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn get_changing_configurations<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getChangingConfigurations\0", b"()I\0"))? .call(env, self.as_ref(), ()) } pub fn get_last_non_configuration_instance<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getLastNonConfigurationInstance\0", b"()Ljava/lang/Object;\0"))? .call(env, self.as_ref(), ()) } pub fn on_retain_non_configuration_instance<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onRetainNonConfigurationInstance\0", b"()Ljava/lang/Object;\0"))? .call(env, self.as_ref(), ()) } pub fn on_low_memory<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onLowMemory\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_trim_memory<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onTrimMemory\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn get_fragment_manager<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getFragmentManager\0", b"()Landroid/app/FragmentManager;\0"))? .call(env, self.as_ref(), ()) } pub fn on_attach_fragment<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onAttachFragment\0", b"(Landroid/app/Fragment;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn managed_query<'a>( &'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a JArrayObject, arg2: &'a JString, arg3: &'a JArrayObject, arg4: &'a JString, ) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"managedQuery\0", b"(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;\0"))? .call(env, self.as_ref(), (arg0,arg1,arg2,arg3,arg4,)) } pub fn start_managing_cursor<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startManagingCursor\0", b"(Landroid/database/Cursor;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn stop_managing_cursor<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"stopManagingCursor\0", b"(Landroid/database/Cursor;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn find_view_by_id<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<&'a crate::android::view::View> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"findViewById\0", b"(I)Landroid/view/View;\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn require_view_by_id<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<&'a crate::android::view::View> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"requireViewById\0", b"(I)Landroid/view/View;\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn get_action_bar<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getActionBar\0", b"()Landroid/app/ActionBar;\0"))? .call(env, self.as_ref(), ()) } pub fn set_action_bar<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setActionBar\0", b"(Landroid/widget/Toolbar;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_content_view<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setContentView\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_content_view_v2<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::View) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setContentView\0", b"(Landroid/view/View;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_content_view_v3<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::View, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"setContentView\0", b"(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn add_content_view<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::View, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"addContentView\0", b"(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn get_content_transition_manager<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getContentTransitionManager\0", b"()Landroid/transition/TransitionManager;\0"))? .call(env, self.as_ref(), ()) } pub fn set_content_transition_manager<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"setContentTransitionManager\0", b"(Landroid/transition/TransitionManager;)V\0", ) })? .call(env, self.as_ref(), (arg0,)) } pub fn get_content_scene<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getContentScene\0", b"()Landroid/transition/Scene;\0"))? .call(env, self.as_ref(), ()) } pub fn set_finish_on_touch_outside<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setFinishOnTouchOutside\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_default_key_mode<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setDefaultKeyMode\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_key_down<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a crate::android::view::KeyEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onKeyDown\0", b"(ILandroid/view/KeyEvent;)Z\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_key_long_press<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a crate::android::view::KeyEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onKeyLongPress\0", b"(ILandroid/view/KeyEvent;)Z\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_key_up<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a crate::android::view::KeyEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onKeyUp\0", b"(ILandroid/view/KeyEvent;)Z\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_key_multiple<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: JInt, arg2: &'a crate::android::view::KeyEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onKeyMultiple\0", b"(IILandroid/view/KeyEvent;)Z\0"))? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn on_back_pressed<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onBackPressed\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_key_shortcut<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a crate::android::view::KeyEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onKeyShortcut\0", b"(ILandroid/view/KeyEvent;)Z\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_touch_event<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::MotionEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onTouchEvent\0", b"(Landroid/view/MotionEvent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_trackball_event<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::MotionEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onTrackballEvent\0", b"(Landroid/view/MotionEvent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_generic_motion_event<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::MotionEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onGenericMotionEvent\0", b"(Landroid/view/MotionEvent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_user_interaction<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onUserInteraction\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_window_attributes_changed<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onWindowAttributesChanged\0", b"(Landroid/view/WindowManager$LayoutParams;)V\0", ) })? .call(env, self.as_ref(), (arg0,)) } pub fn on_content_changed<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onContentChanged\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_window_focus_changed<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onWindowFocusChanged\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_attached_to_window<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onAttachedToWindow\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_detached_from_window<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onDetachedFromWindow\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn has_window_focus<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"hasWindowFocus\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn dispatch_key_event<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::KeyEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"dispatchKeyEvent\0", b"(Landroid/view/KeyEvent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn dispatch_key_shortcut_event<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::KeyEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"dispatchKeyShortcutEvent\0", b"(Landroid/view/KeyEvent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn dispatch_touch_event<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::MotionEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"dispatchTouchEvent\0", b"(Landroid/view/MotionEvent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn dispatch_trackball_event<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::MotionEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"dispatchTrackballEvent\0", b"(Landroid/view/MotionEvent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn dispatch_generic_motion_event<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::MotionEvent) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"dispatchGenericMotionEvent\0", b"(Landroid/view/MotionEvent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn dispatch_populate_accessibility_event<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"dispatchPopulateAccessibilityEvent\0", b"(Landroid/view/accessibility/AccessibilityEvent;)Z\0", ) })? .call(env, self.as_ref(), (arg0,)) } pub fn on_create_panel_view<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<&'a crate::android::view::View> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onCreatePanelView\0", b"(I)Landroid/view/View;\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_create_panel_menu<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onCreatePanelMenu\0", b"(ILandroid/view/Menu;)Z\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_prepare_panel<'a>( &'a self, env: &'a JEnv, arg0: JInt, arg1: &'a crate::android::view::View, arg2: &'a JObject, ) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPreparePanel\0", b"(ILandroid/view/View;Landroid/view/Menu;)Z\0"))? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn on_menu_opened<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onMenuOpened\0", b"(ILandroid/view/Menu;)Z\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_menu_item_selected<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onMenuItemSelected\0", b"(ILandroid/view/MenuItem;)Z\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_panel_closed<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPanelClosed\0", b"(ILandroid/view/Menu;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn invalidate_options_menu<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"invalidateOptionsMenu\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_create_options_menu<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onCreateOptionsMenu\0", b"(Landroid/view/Menu;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_prepare_options_menu<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPrepareOptionsMenu\0", b"(Landroid/view/Menu;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_options_item_selected<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onOptionsItemSelected\0", b"(Landroid/view/MenuItem;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_navigate_up<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onNavigateUp\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn on_navigate_up_from_child<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::app::Activity) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onNavigateUpFromChild\0", b"(Landroid/app/Activity;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_create_navigate_up_task_stack<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onCreateNavigateUpTaskStack\0", b"(Landroid/app/TaskStackBuilder;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_prepare_navigate_up_task_stack<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPrepareNavigateUpTaskStack\0", b"(Landroid/app/TaskStackBuilder;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_options_menu_closed<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onOptionsMenuClosed\0", b"(Landroid/view/Menu;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn open_options_menu<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"openOptionsMenu\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn close_options_menu<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"closeOptionsMenu\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_create_context_menu<'a>( &'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a crate::android::view::View, arg2: &'a JObject, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onCreateContextMenu\0", b"(Landroid/view/ContextMenu;Landroid/view/View;Landroid/view/ContextMenu$ContextMenuInfo;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn register_for_context_menu<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::View) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"registerForContextMenu\0", b"(Landroid/view/View;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn unregister_for_context_menu<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::View) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"unregisterForContextMenu\0", b"(Landroid/view/View;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn open_context_menu<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::view::View) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"openContextMenu\0", b"(Landroid/view/View;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn close_context_menu<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"closeContextMenu\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_context_item_selected<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onContextItemSelected\0", b"(Landroid/view/MenuItem;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_context_menu_closed<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onContextMenuClosed\0", b"(Landroid/view/Menu;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_create_dialog<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onCreateDialog\0", b"(I)Landroid/app/Dialog;\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_create_dialog_v2<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a crate::android::os::Bundle) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onCreateDialog\0", b"(ILandroid/os/Bundle;)Landroid/app/Dialog;\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_prepare_dialog<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPrepareDialog\0", b"(ILandroid/app/Dialog;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_prepare_dialog_v2<'a>( &'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JObject, arg2: &'a crate::android::os::Bundle, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onPrepareDialog\0", b"(ILandroid/app/Dialog;Landroid/os/Bundle;)V\0"))? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn show_dialog<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"showDialog\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn show_dialog_v2<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a crate::android::os::Bundle) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"showDialog\0", b"(ILandroid/os/Bundle;)Z\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn dismiss_dialog<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"dismissDialog\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn remove_dialog<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"removeDialog\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_search_requested<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onSearchRequested\0", b"(Landroid/view/SearchEvent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_search_requested_v2<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onSearchRequested\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn get_search_event<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getSearchEvent\0", b"()Landroid/view/SearchEvent;\0"))? .call(env, self.as_ref(), ()) } pub fn start_search<'a>( &'a self, env: &'a JEnv, arg0: &'a JString, arg1: JBool, arg2: &'a crate::android::os::Bundle, arg3: JBool, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startSearch\0", b"(Ljava/lang/String;ZLandroid/os/Bundle;Z)V\0"))? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3)) } pub fn trigger_search<'a>(&'a self, env: &'a JEnv, arg0: &'a JString, arg1: &'a crate::android::os::Bundle) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"triggerSearch\0", b"(Ljava/lang/String;Landroid/os/Bundle;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn take_key_events<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"takeKeyEvents\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn request_window_feature<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"requestWindowFeature\0", b"(I)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_feature_drawable_resource<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setFeatureDrawableResource\0", b"(II)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn set_feature_drawable_uri<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setFeatureDrawableUri\0", b"(ILandroid/net/Uri;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn set_feature_drawable<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setFeatureDrawable\0", b"(ILandroid/graphics/drawable/Drawable;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn set_feature_drawable_alpha<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setFeatureDrawableAlpha\0", b"(II)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn get_layout_inflater<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getLayoutInflater\0", b"()Landroid/view/LayoutInflater;\0"))? .call(env, self.as_ref(), ()) } pub fn get_menu_inflater<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getMenuInflater\0", b"()Landroid/view/MenuInflater;\0"))? .call(env, self.as_ref(), ()) } pub fn set_theme<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setTheme\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_apply_theme_resource<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: JInt, arg2: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onApplyThemeResource\0", b"(Landroid/content/res/Resources$Theme;IZ)V\0"))? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn request_permissions<'a>(&'a self, env: &'a JEnv, arg0: &'a JArrayObject, arg1: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"requestPermissions\0", b"([Ljava/lang/String;I)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_request_permissions_result<'a>( &'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JArrayObject, arg2: &'a JArrayPrim, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onRequestPermissionsResult\0", b"(I[Ljava/lang/String;[I)V\0"))? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn should_show_request_permission_rationale<'a>(&'a self, env: &'a JEnv, arg0: &'a JString) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"shouldShowRequestPermissionRationale\0", b"(Ljava/lang/String;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn start_activity_for_result<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startActivityForResult\0", b"(Landroid/content/Intent;I)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn start_activity_for_result_v2<'a>( &'a self, env: &'a JEnv, arg0: &'a JObject, arg1: JInt, arg2: &'a crate::android::os::Bundle, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startActivityForResult\0", b"(Landroid/content/Intent;ILandroid/os/Bundle;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn is_activity_transition_running<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isActivityTransitionRunning\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn start_intent_sender_for_result<'a>( &'a self, env: &'a JEnv, arg0: &'a JObject, arg1: JInt, arg2: &'a JObject, arg3: JInt, arg4: JInt, arg5: JInt, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startIntentSenderForResult\0", b"(Landroid/content/IntentSender;ILandroid/content/Intent;III)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3, arg4, arg5)) } pub fn start_intent_sender_for_result_v2<'a>( &'a self, env: &'a JEnv, arg0: &'a JObject, arg1: JInt, arg2: &'a JObject, arg3: JInt, arg4: JInt, arg5: JInt, arg6: &'a crate::android::os::Bundle, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startIntentSenderForResult\0", b"(Landroid/content/IntentSender;ILandroid/content/Intent;IIILandroid/os/Bundle;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3, arg4, arg5, arg6)) } pub fn start_activity<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startActivity\0", b"(Landroid/content/Intent;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn start_activity_v2<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a crate::android::os::Bundle) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startActivity\0", b"(Landroid/content/Intent;Landroid/os/Bundle;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn start_activities<'a>(&'a self, env: &'a JEnv, arg0: &'a JArrayObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startActivities\0", b"([Landroid/content/Intent;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn start_activities_v2<'a>( &'a self, env: &'a JEnv, arg0: &'a JArrayObject, arg1: &'a crate::android::os::Bundle, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startActivities\0", b"([Landroid/content/Intent;Landroid/os/Bundle;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn start_intent_sender<'a>( &'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a JObject, arg2: JInt, arg3: JInt, arg4: JInt, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startIntentSender\0", b"(Landroid/content/IntentSender;Landroid/content/Intent;III)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3, arg4)) } pub fn start_intent_sender_v2<'a>( &'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a JObject, arg2: JInt, arg3: JInt, arg4: JInt, arg5: &'a crate::android::os::Bundle, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startIntentSender\0", b"(Landroid/content/IntentSender;Landroid/content/Intent;IIILandroid/os/Bundle;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3, arg4, arg5)) } pub fn start_activity_if_needed<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: JInt) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startActivityIfNeeded\0", b"(Landroid/content/Intent;I)Z\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn start_activity_if_needed_v2<'a>( &'a self, env: &'a JEnv, arg0: &'a JObject, arg1: JInt, arg2: &'a crate::android::os::Bundle, ) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startActivityIfNeeded\0", b"(Landroid/content/Intent;ILandroid/os/Bundle;)Z\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn start_next_matching_activity<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startNextMatchingActivity\0", b"(Landroid/content/Intent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn start_next_matching_activity_v2<'a>( &'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a crate::android::os::Bundle, ) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startNextMatchingActivity\0", b"(Landroid/content/Intent;Landroid/os/Bundle;)Z\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn start_activity_from_child<'a>( &'a self, env: &'a JEnv, arg0: &'a crate::android::app::Activity, arg1: &'a JObject, arg2: JInt, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startActivityFromChild\0", b"(Landroid/app/Activity;Landroid/content/Intent;I)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn start_activity_from_child_v2<'a>( &'a self, env: &'a JEnv, arg0: &'a crate::android::app::Activity, arg1: &'a JObject, arg2: JInt, arg3: &'a crate::android::os::Bundle, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startActivityFromChild\0", b"(Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3)) } pub fn start_activity_from_fragment<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a JObject, arg2: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startActivityFromFragment\0", b"(Landroid/app/Fragment;Landroid/content/Intent;I)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn start_activity_from_fragment_v2<'a>( &'a self, env: &'a JEnv, arg0: &'a JObject, arg1: &'a JObject, arg2: JInt, arg3: &'a crate::android::os::Bundle, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startActivityFromFragment\0", b"(Landroid/app/Fragment;Landroid/content/Intent;ILandroid/os/Bundle;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3)) } pub fn start_intent_sender_from_child<'a>( &'a self, env: &'a JEnv, arg0: &'a crate::android::app::Activity, arg1: &'a JObject, arg2: JInt, arg3: &'a JObject, arg4: JInt, arg5: JInt, arg6: JInt, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startIntentSenderFromChild\0", b"(Landroid/app/Activity;Landroid/content/IntentSender;ILandroid/content/Intent;III)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3, arg4, arg5, arg6)) } pub fn start_intent_sender_from_child_v2<'a>( &'a self, env: &'a JEnv, arg0: &'a crate::android::app::Activity, arg1: &'a JObject, arg2: JInt, arg3: &'a JObject, arg4: JInt, arg5: JInt, arg6: JInt, arg7: &'a crate::android::os::Bundle, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startIntentSenderFromChild\0", b"(Landroid/app/Activity;Landroid/content/IntentSender;ILandroid/content/Intent;IIILandroid/os/Bundle;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)) } pub fn override_pending_transition<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"overridePendingTransition\0", b"(II)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn override_pending_transition_v2<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: JInt, arg2: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"overridePendingTransition\0", b"(III)V\0"))? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn set_result<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setResult\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_result_v2<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setResult\0", b"(ILandroid/content/Intent;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn get_referrer<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getReferrer\0", b"()Landroid/net/Uri;\0"))? .call(env, self.as_ref(), ()) } pub fn on_provide_referrer<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onProvideReferrer\0", b"()Landroid/net/Uri;\0"))? .call(env, self.as_ref(), ()) } pub fn get_calling_package<'a>(&'a self, env: &'a JEnv) -> Option<&'a JString> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getCallingPackage\0", b"()Ljava/lang/String;\0"))? .call(env, self.as_ref(), ()) } pub fn get_calling_activity<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getCallingActivity\0", b"()Landroid/content/ComponentName;\0"))? .call(env, self.as_ref(), ()) } pub fn set_visible<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setVisible\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn is_finishing<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isFinishing\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn is_destroyed<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isDestroyed\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn is_changing_configurations<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isChangingConfigurations\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn recreate<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"recreate\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn finish<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"finish\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn finish_affinity<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"finishAffinity\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn finish_from_child<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::app::Activity) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"finishFromChild\0", b"(Landroid/app/Activity;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn finish_after_transition<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"finishAfterTransition\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn finish_activity<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"finishActivity\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn finish_activity_from_child<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::app::Activity, arg1: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"finishActivityFromChild\0", b"(Landroid/app/Activity;I)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn finish_and_remove_task<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"finishAndRemoveTask\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn release_instance<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"releaseInstance\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn on_activity_result<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: JInt, arg2: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onActivityResult\0", b"(IILandroid/content/Intent;)V\0"))? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn on_activity_reenter<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onActivityReenter\0", b"(ILandroid/content/Intent;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn create_pending_result<'a>(&'a self, env: &'a JEnv, arg0: JInt, arg1: &'a JObject, arg2: JInt) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"createPendingResult\0", b"(ILandroid/content/Intent;I)Landroid/app/PendingIntent;\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn set_requested_orientation<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setRequestedOrientation\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn get_requested_orientation<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getRequestedOrientation\0", b"()I\0"))? .call(env, self.as_ref(), ()) } pub fn get_task_id<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getTaskId\0", b"()I\0"))? .call(env, self.as_ref(), ()) } pub fn is_task_root<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isTaskRoot\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn move_task_to_back<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"moveTaskToBack\0", b"(Z)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn get_local_class_name<'a>(&'a self, env: &'a JEnv) -> Option<&'a JString> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getLocalClassName\0", b"()Ljava/lang/String;\0"))? .call(env, self.as_ref(), ()) } pub fn get_component_name<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getComponentName\0", b"()Landroid/content/ComponentName;\0"))? .call(env, self.as_ref(), ()) } pub fn get_preferences<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getPreferences\0", b"(I)Landroid/content/SharedPreferences;\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn is_launched_from_bubble<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isLaunchedFromBubble\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn get_system_service<'a>(&'a self, env: &'a JEnv, arg0: &'a JString) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getSystemService\0", b"(Ljava/lang/String;)Ljava/lang/Object;\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_title<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setTitle\0", b"(Ljava/lang/CharSequence;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_title_v2<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setTitle\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_title_color<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setTitleColor\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn get_title<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getTitle\0", b"()Ljava/lang/CharSequence;\0"))? .call(env, self.as_ref(), ()) } pub fn get_title_color<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getTitleColor\0", b"()I\0"))? .call(env, self.as_ref(), ()) } pub fn on_title_changed<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onTitleChanged\0", b"(Ljava/lang/CharSequence;I)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_child_title_changed<'a>(&'a self, env: &'a JEnv, arg0: &'a crate::android::app::Activity, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onChildTitleChanged\0", b"(Landroid/app/Activity;Ljava/lang/CharSequence;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn set_task_description<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setTaskDescription\0", b"(Landroid/app/ActivityManager$TaskDescription;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_progress_bar_visibility<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setProgressBarVisibility\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_progress_bar_indeterminate_visibility<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setProgressBarIndeterminateVisibility\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_progress_bar_indeterminate<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setProgressBarIndeterminate\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_progress<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setProgress\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_secondary_progress<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setSecondaryProgress\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_volume_control_stream<'a>(&'a self, env: &'a JEnv, arg0: JInt) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setVolumeControlStream\0", b"(I)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn get_volume_control_stream<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getVolumeControlStream\0", b"()I\0"))? .call(env, self.as_ref(), ()) } pub fn set_media_controller<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setMediaController\0", b"(Landroid/media/session/MediaController;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn get_media_controller<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getMediaController\0", b"()Landroid/media/session/MediaController;\0"))? .call(env, self.as_ref(), ()) } pub fn run_on_ui_thread<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"runOnUiThread\0", b"(Ljava/lang/Runnable;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_create_view<'a>( &'a self, env: &'a JEnv, arg0: &'a JString, arg1: &'a crate::android::content::Context, arg2: &'a JObject, ) -> Option<&'a crate::android::view::View> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onCreateView\0", b"(Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2)) } pub fn on_create_view_v2<'a>( &'a self, env: &'a JEnv, arg0: &'a crate::android::view::View, arg1: &'a JString, arg2: &'a crate::android::content::Context, arg3: &'a JObject, ) -> Option<&'a crate::android::view::View> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onCreateView\0", b"(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3)) } pub fn dump<'a>( &'a self, env: &'a JEnv, arg0: &'a JString, arg1: &'a JObject, arg2: &'a JObject, arg3: &'a JArrayObject, ) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"dump\0", b"(Ljava/lang/String;Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V\0", ) })? .call(env, self.as_ref(), (arg0, arg1, arg2, arg3)) } pub fn is_immersive<'a>(&'a self, env: &'a JEnv) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"isImmersive\0", b"()Z\0"))? .call(env, self.as_ref(), ()) } pub fn set_translucent<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setTranslucent\0", b"(Z)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn request_visible_behind<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"requestVisibleBehind\0", b"(Z)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_visible_behind_canceled<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onVisibleBehindCanceled\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn on_enter_animation_complete<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onEnterAnimationComplete\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn set_immersive<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setImmersive\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_vr_mode_enabled<'a>(&'a self, env: &'a JEnv, arg0: JBool, arg1: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setVrModeEnabled\0", b"(ZLandroid/content/ComponentName;)V\0"))? .call(env, self.as_ref(), (arg0, arg1)) } pub fn start_action_mode<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startActionMode\0", b"(Landroid/view/ActionMode$Callback;)Landroid/view/ActionMode;\0", ) })? .call(env, self.as_ref(), (arg0,)) } pub fn start_action_mode_v2<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: JInt) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"startActionMode\0", b"(Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_window_starting_action_mode<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onWindowStartingActionMode\0", b"(Landroid/view/ActionMode$Callback;)Landroid/view/ActionMode;\0", ) })? .call(env, self.as_ref(), (arg0,)) } pub fn on_window_starting_action_mode_v2<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject, arg1: JInt) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"onWindowStartingActionMode\0", b"(Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn on_action_mode_started<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onActionModeStarted\0", b"(Landroid/view/ActionMode;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn on_action_mode_finished<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"onActionModeFinished\0", b"(Landroid/view/ActionMode;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn should_up_recreate_task<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"shouldUpRecreateTask\0", b"(Landroid/content/Intent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn navigate_up_to<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"navigateUpTo\0", b"(Landroid/content/Intent;)Z\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn navigate_up_to_from_child<'a>( &'a self, env: &'a JEnv, arg0: &'a crate::android::app::Activity, arg1: &'a JObject, ) -> Option { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"navigateUpToFromChild\0", b"(Landroid/app/Activity;Landroid/content/Intent;)Z\0", ) })? .call(env, self.as_ref(), (arg0, arg1)) } pub fn get_parent_activity_intent<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"getParentActivityIntent\0", b"()Landroid/content/Intent;\0"))? .call(env, self.as_ref(), ()) } pub fn set_enter_shared_element_callback<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setEnterSharedElementCallback\0", b"(Landroid/app/SharedElementCallback;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_exit_shared_element_callback<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setExitSharedElementCallback\0", b"(Landroid/app/SharedElementCallback;)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn postpone_enter_transition<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"postponeEnterTransition\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn start_postponed_enter_transition<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startPostponedEnterTransition\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn request_drag_and_drop_permissions<'a>(&'a self, env: &'a JEnv, arg0: &'a JObject) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"requestDragAndDropPermissions\0", b"(Landroid/view/DragEvent;)Landroid/view/DragAndDropPermissions;\0", ) })? .call(env, self.as_ref(), (arg0,)) } pub fn start_lock_task<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"startLockTask\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn stop_lock_task<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"stopLockTask\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn show_lock_task_escape_message<'a>(&'a self, env: &'a JEnv) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"showLockTaskEscapeMessage\0", b"()V\0"))? .call(env, self.as_ref(), ()) } pub fn set_recents_screenshot_enabled<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setRecentsScreenshotEnabled\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_show_when_locked<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setShowWhenLocked\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_inherit_show_when_locked<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setInheritShowWhenLocked\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn set_turn_screen_on<'a>(&'a self, env: &'a JEnv, arg0: JBool) -> Option<()> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| Self::class(Some(env))?.method(env, b"setTurnScreenOn\0", b"(Z)V\0"))? .call(env, self.as_ref(), (arg0,)) } pub fn get_on_back_invoked_dispatcher<'a>(&'a self, env: &'a JEnv) -> Option<&'a JObject> { static CACHE: CachedID = CachedID::new(); CACHE .get(|| { Self::class(Some(env))?.method( env, b"getOnBackInvokedDispatcher\0", b"()Landroid/window/OnBackInvokedDispatcher;\0", ) })? .call(env, self.as_ref(), ()) } } #[test] fn test_type_zero() { assert_eq!(0, std::mem::size_of::()); }