1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


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

        // // Not emitting: Non-public method
        // /// <init>
        // fn new<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::Result<__jni_bindgen::Local<'env, crate::android::content::pm::PackageInstaller>> {
        //     // class.path == "android/content/pm/PackageInstaller", java.flags == (empty), .name == "<init>", .descriptor == "()V"
        //     unsafe {
        //         let __jni_args = [];
        //         let (__jni_class, __jni_method) = __jni_env.require_class_method("android/content/pm/PackageInstaller\0", "<init>\0", "()V\0");
        //         __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
        //     }
        // }

        /// [createSession](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#createSession(android,%2520content,%2520pm,%2520PackageInstaller.SessionParams))
        ///
        /// Required features: "android-content-pm-PackageInstaller_SessionParams"
        #[cfg(any(feature = "all", all(feature = "android-content-pm-PackageInstaller_SessionParams")))]
        pub fn create_session<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::pm::PackageInstaller_SessionParams>>) -> __jni_bindgen::Result<i32> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "createSession", .descriptor == "(Landroid/content/pm/PackageInstaller$SessionParams;)I"
            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/PackageInstaller\0", "createSession\0", "(Landroid/content/pm/PackageInstaller$SessionParams;)I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [openSession](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#openSession(int))
        ///
        /// Required features: "android-content-pm-PackageInstaller_Session"
        #[cfg(any(feature = "all", all(feature = "android-content-pm-PackageInstaller_Session")))]
        pub fn open_session<'env>(&'env self, arg0: i32) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::content::pm::PackageInstaller_Session>>> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "openSession", .descriptor == "(I)Landroid/content/pm/PackageInstaller$Session;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/content/pm/PackageInstaller\0", "openSession\0", "(I)Landroid/content/pm/PackageInstaller$Session;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [updateSessionAppIcon](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#updateSessionAppIcon(int,%2520android,%2520graphics,%2520Bitmap))
        ///
        /// Required features: "android-graphics-Bitmap"
        #[cfg(any(feature = "all", all(feature = "android-graphics-Bitmap")))]
        pub fn update_session_app_icon<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::graphics::Bitmap>>) -> __jni_bindgen::Result<()> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "updateSessionAppIcon", .descriptor == "(ILandroid/graphics/Bitmap;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __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/PackageInstaller\0", "updateSessionAppIcon\0", "(ILandroid/graphics/Bitmap;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [updateSessionAppLabel](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#updateSessionAppLabel(int,%2520java,%2520lang,%2520CharSequence))
        ///
        /// Required features: "java-lang-CharSequence"
        #[cfg(any(feature = "all", all(feature = "java-lang-CharSequence")))]
        pub fn update_session_app_label<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::CharSequence>>) -> __jni_bindgen::Result<()> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "updateSessionAppLabel", .descriptor == "(ILjava/lang/CharSequence;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __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/PackageInstaller\0", "updateSessionAppLabel\0", "(ILjava/lang/CharSequence;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [abandonSession](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#abandonSession(int))
        pub fn abandon_session<'env>(&'env self, arg0: i32) -> __jni_bindgen::Result<()> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "abandonSession", .descriptor == "(I)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/content/pm/PackageInstaller\0", "abandonSession\0", "(I)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getSessionInfo](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#getSessionInfo(int))
        ///
        /// Required features: "android-content-pm-PackageInstaller_SessionInfo"
        #[cfg(any(feature = "all", all(feature = "android-content-pm-PackageInstaller_SessionInfo")))]
        pub fn get_session_info<'env>(&'env self, arg0: i32) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::content::pm::PackageInstaller_SessionInfo>>> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "getSessionInfo", .descriptor == "(I)Landroid/content/pm/PackageInstaller$SessionInfo;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/content/pm/PackageInstaller\0", "getSessionInfo\0", "(I)Landroid/content/pm/PackageInstaller$SessionInfo;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getAllSessions](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#getAllSessions())
        ///
        /// Required features: "java-util-List"
        #[cfg(any(feature = "all", all(feature = "java-util-List")))]
        pub fn get_all_sessions<'env>(&'env self) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::List>>> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "getAllSessions", .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/PackageInstaller\0", "getAllSessions\0", "()Ljava/util/List;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getMySessions](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#getMySessions())
        ///
        /// Required features: "java-util-List"
        #[cfg(any(feature = "all", all(feature = "java-util-List")))]
        pub fn get_my_sessions<'env>(&'env self) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::List>>> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "getMySessions", .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/PackageInstaller\0", "getMySessions\0", "()Ljava/util/List;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [uninstall](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#uninstall(java,%2520lang,%2520String,%2520android,%2520content,%2520IntentSender))
        ///
        /// Required features: "android-content-IntentSender", "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "android-content-IntentSender", feature = "java-lang-String")))]
        pub fn uninstall_string_intent_sender<'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::content::IntentSender>>) -> __jni_bindgen::Result<()> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "uninstall", .descriptor == "(Ljava/lang/String;Landroid/content/IntentSender;)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/PackageInstaller\0", "uninstall\0", "(Ljava/lang/String;Landroid/content/IntentSender;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [uninstall](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#uninstall(android,%2520content,%2520pm,%2520VersionedPackage,%2520android,%2520content,%2520IntentSender))
        ///
        /// Required features: "android-content-IntentSender", "android-content-pm-VersionedPackage"
        #[cfg(any(feature = "all", all(feature = "android-content-IntentSender", feature = "android-content-pm-VersionedPackage")))]
        pub fn uninstall_versioned_package_intent_sender<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::pm::VersionedPackage>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::IntentSender>>) -> __jni_bindgen::Result<()> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "uninstall", .descriptor == "(Landroid/content/pm/VersionedPackage;Landroid/content/IntentSender;)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/PackageInstaller\0", "uninstall\0", "(Landroid/content/pm/VersionedPackage;Landroid/content/IntentSender;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [registerSessionCallback](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#registerSessionCallback(android,%2520content,%2520pm,%2520PackageInstaller.SessionCallback))
        ///
        /// Required features: "android-content-pm-PackageInstaller_SessionCallback"
        #[cfg(any(feature = "all", all(feature = "android-content-pm-PackageInstaller_SessionCallback")))]
        pub fn register_session_callback_session_callback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::pm::PackageInstaller_SessionCallback>>) -> __jni_bindgen::Result<()> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "registerSessionCallback", .descriptor == "(Landroid/content/pm/PackageInstaller$SessionCallback;)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/PackageInstaller\0", "registerSessionCallback\0", "(Landroid/content/pm/PackageInstaller$SessionCallback;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [unregisterSessionCallback](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#unregisterSessionCallback(android,%2520content,%2520pm,%2520PackageInstaller.SessionCallback))
        ///
        /// Required features: "android-content-pm-PackageInstaller_SessionCallback"
        #[cfg(any(feature = "all", all(feature = "android-content-pm-PackageInstaller_SessionCallback")))]
        pub fn unregister_session_callback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::content::pm::PackageInstaller_SessionCallback>>) -> __jni_bindgen::Result<()> {
            // class.path == "android/content/pm/PackageInstaller", java.flags == PUBLIC, .name == "unregisterSessionCallback", .descriptor == "(Landroid/content/pm/PackageInstaller$SessionCallback;)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/PackageInstaller\0", "unregisterSessionCallback\0", "(Landroid/content/pm/PackageInstaller$SessionCallback;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// public static final [ACTION_SESSION_COMMITTED](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#ACTION_SESSION_COMMITTED)
        pub const ACTION_SESSION_COMMITTED : &'static str = "android.content.pm.action.SESSION_COMMITTED";

        /// public static final [ACTION_SESSION_DETAILS](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#ACTION_SESSION_DETAILS)
        pub const ACTION_SESSION_DETAILS : &'static str = "android.content.pm.action.SESSION_DETAILS";

        /// public static final [EXTRA_OTHER_PACKAGE_NAME](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_OTHER_PACKAGE_NAME)
        pub const EXTRA_OTHER_PACKAGE_NAME : &'static str = "android.content.pm.extra.OTHER_PACKAGE_NAME";

        /// public static final [EXTRA_PACKAGE_NAME](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_PACKAGE_NAME)
        pub const EXTRA_PACKAGE_NAME : &'static str = "android.content.pm.extra.PACKAGE_NAME";

        /// public static final [EXTRA_SESSION](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_SESSION)
        pub const EXTRA_SESSION : &'static str = "android.content.pm.extra.SESSION";

        /// public static final [EXTRA_SESSION_ID](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_SESSION_ID)
        pub const EXTRA_SESSION_ID : &'static str = "android.content.pm.extra.SESSION_ID";

        /// public static final [EXTRA_STATUS](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_STATUS)
        pub const EXTRA_STATUS : &'static str = "android.content.pm.extra.STATUS";

        /// public static final [EXTRA_STATUS_MESSAGE](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_STATUS_MESSAGE)
        pub const EXTRA_STATUS_MESSAGE : &'static str = "android.content.pm.extra.STATUS_MESSAGE";

        /// public static final [EXTRA_STORAGE_PATH](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#EXTRA_STORAGE_PATH)
        pub const EXTRA_STORAGE_PATH : &'static str = "android.content.pm.extra.STORAGE_PATH";

        /// public static final [STATUS_FAILURE](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE)
        pub const STATUS_FAILURE : i32 = 1;

        /// public static final [STATUS_FAILURE_ABORTED](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_ABORTED)
        pub const STATUS_FAILURE_ABORTED : i32 = 3;

        /// public static final [STATUS_FAILURE_BLOCKED](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_BLOCKED)
        pub const STATUS_FAILURE_BLOCKED : i32 = 2;

        /// public static final [STATUS_FAILURE_CONFLICT](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_CONFLICT)
        pub const STATUS_FAILURE_CONFLICT : i32 = 5;

        /// public static final [STATUS_FAILURE_INCOMPATIBLE](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_INCOMPATIBLE)
        pub const STATUS_FAILURE_INCOMPATIBLE : i32 = 7;

        /// public static final [STATUS_FAILURE_INVALID](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_INVALID)
        pub const STATUS_FAILURE_INVALID : i32 = 4;

        /// public static final [STATUS_FAILURE_STORAGE](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_FAILURE_STORAGE)
        pub const STATUS_FAILURE_STORAGE : i32 = 6;

        /// public static final [STATUS_PENDING_USER_ACTION](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_PENDING_USER_ACTION)
        pub const STATUS_PENDING_USER_ACTION : i32 = -1;

        /// public static final [STATUS_SUCCESS](https://developer.android.com/reference/android/content/pm/PackageInstaller.html#STATUS_SUCCESS)
        pub const STATUS_SUCCESS : i32 = 0;
    }
}