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
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


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

        // // Not emitting: Non-public method
        // // Not emitting: Passing in arrays of objects is not yet supported
        // // Not emitting: Passing in arrays of objects is not yet supported
        // // Not emitting: Passing in arrays of objects is not yet supported
        // // Not emitting: Passing in arrays of objects is not yet supported
        // /// <init>
        // ///
        // /// Required features: "java-lang-String", "java-util-Date"
        // #[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-util-Date")))]
        // fn new<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::Date>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::Date>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::Date>>, arg3: i32, arg4: Array { levels: 1, inner: Class(Id("java/lang/String")) }, arg5: Array { levels: 1, inner: Class(Id("java/lang/String")) }, arg6: Array { levels: 1, inner: Class(Id("java/lang/String")) }, arg7: Array { levels: 1, inner: Class(Id("java/lang/String")) }, arg8: bool, arg9: bool, arg10: i32, arg11: bool, arg12: bool, arg13: bool, arg14: i64, arg15: bool, arg16: bool, arg17: bool, arg18: bool) -> __jni_bindgen::Result<__jni_bindgen::Local<'env, crate::android::security::keystore::KeyProtection>> {
        //     // class.path == "android/security/keystore/KeyProtection", java.flags == (empty), .name == "<init>", .descriptor == "(Ljava/util/Date;Ljava/util/Date;Ljava/util/Date;I[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;ZZIZZZJZZZZ)V"
        //     unsafe {
        //         let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into()), __jni_bindgen::AsJValue::as_jvalue(&arg2.into()), __jni_bindgen::AsJValue::as_jvalue(&arg3), __jni_bindgen::AsJValue::as_jvalue(&arg4.into()), __jni_bindgen::AsJValue::as_jvalue(&arg5.into()), __jni_bindgen::AsJValue::as_jvalue(&arg6.into()), __jni_bindgen::AsJValue::as_jvalue(&arg7.into()), __jni_bindgen::AsJValue::as_jvalue(&arg8), __jni_bindgen::AsJValue::as_jvalue(&arg9), __jni_bindgen::AsJValue::as_jvalue(&arg10), __jni_bindgen::AsJValue::as_jvalue(&arg11), __jni_bindgen::AsJValue::as_jvalue(&arg12), __jni_bindgen::AsJValue::as_jvalue(&arg13), __jni_bindgen::AsJValue::as_jvalue(&arg14), __jni_bindgen::AsJValue::as_jvalue(&arg15), __jni_bindgen::AsJValue::as_jvalue(&arg16), __jni_bindgen::AsJValue::as_jvalue(&arg17), __jni_bindgen::AsJValue::as_jvalue(&arg18)];
        //         let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "<init>\0", "(Ljava/util/Date;Ljava/util/Date;Ljava/util/Date;I[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;ZZIZZZJZZZZ)V\0");
        //         __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
        //     }
        // }

        /// [getKeyValidityStart](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#getKeyValidityStart())
        ///
        /// Required features: "java-util-Date"
        #[cfg(any(feature = "all", all(feature = "java-util-Date")))]
        pub fn get_key_validity_start<'env>(&'env self) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::Date>>> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "getKeyValidityStart", .descriptor == "()Ljava/util/Date;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "getKeyValidityStart\0", "()Ljava/util/Date;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getKeyValidityForConsumptionEnd](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#getKeyValidityForConsumptionEnd())
        ///
        /// Required features: "java-util-Date"
        #[cfg(any(feature = "all", all(feature = "java-util-Date")))]
        pub fn get_key_validity_for_consumption_end<'env>(&'env self) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::Date>>> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "getKeyValidityForConsumptionEnd", .descriptor == "()Ljava/util/Date;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "getKeyValidityForConsumptionEnd\0", "()Ljava/util/Date;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getKeyValidityForOriginationEnd](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#getKeyValidityForOriginationEnd())
        ///
        /// Required features: "java-util-Date"
        #[cfg(any(feature = "all", all(feature = "java-util-Date")))]
        pub fn get_key_validity_for_origination_end<'env>(&'env self) -> __jni_bindgen::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::Date>>> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "getKeyValidityForOriginationEnd", .descriptor == "()Ljava/util/Date;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "getKeyValidityForOriginationEnd\0", "()Ljava/util/Date;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getPurposes](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#getPurposes())
        pub fn get_purposes<'env>(&'env self) -> __jni_bindgen::Result<i32> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "getPurposes", .descriptor == "()I"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "getPurposes\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        // // Not emitting: Returning arrays of objects not yet supported
        // /// [getEncryptionPaddings](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#getEncryptionPaddings())
        // ///
        // /// Required features: "java-lang-String"
        // #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        // pub fn get_encryption_paddings<'env>(&'env self) -> __jni_bindgen::Result<Array { levels: 1, inner: Class(Id("java/lang/String")) }> {
        //     // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "getEncryptionPaddings", .descriptor == "()[Ljava/lang/String;"
        //     unsafe {
        //         let __jni_args = [];
        //         let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
        //         let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "getEncryptionPaddings\0", "()[Ljava/lang/String;\0");
        //         __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
        //     }
        // }

        // // Not emitting: Returning arrays of objects not yet supported
        // /// [getSignaturePaddings](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#getSignaturePaddings())
        // ///
        // /// Required features: "java-lang-String"
        // #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        // pub fn get_signature_paddings<'env>(&'env self) -> __jni_bindgen::Result<Array { levels: 1, inner: Class(Id("java/lang/String")) }> {
        //     // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "getSignaturePaddings", .descriptor == "()[Ljava/lang/String;"
        //     unsafe {
        //         let __jni_args = [];
        //         let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
        //         let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "getSignaturePaddings\0", "()[Ljava/lang/String;\0");
        //         __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
        //     }
        // }

        // // Not emitting: Returning arrays of objects not yet supported
        // /// [getDigests](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#getDigests())
        // ///
        // /// Required features: "java-lang-String"
        // #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        // pub fn get_digests<'env>(&'env self) -> __jni_bindgen::Result<Array { levels: 1, inner: Class(Id("java/lang/String")) }> {
        //     // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "getDigests", .descriptor == "()[Ljava/lang/String;"
        //     unsafe {
        //         let __jni_args = [];
        //         let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
        //         let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "getDigests\0", "()[Ljava/lang/String;\0");
        //         __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
        //     }
        // }

        /// [isDigestsSpecified](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#isDigestsSpecified())
        pub fn is_digests_specified<'env>(&'env self) -> __jni_bindgen::Result<bool> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "isDigestsSpecified", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "isDigestsSpecified\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        // // Not emitting: Returning arrays of objects not yet supported
        // /// [getBlockModes](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#getBlockModes())
        // ///
        // /// Required features: "java-lang-String"
        // #[cfg(any(feature = "all", all(feature = "java-lang-String")))]
        // pub fn get_block_modes<'env>(&'env self) -> __jni_bindgen::Result<Array { levels: 1, inner: Class(Id("java/lang/String")) }> {
        //     // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "getBlockModes", .descriptor == "()[Ljava/lang/String;"
        //     unsafe {
        //         let __jni_args = [];
        //         let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
        //         let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "getBlockModes\0", "()[Ljava/lang/String;\0");
        //         __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
        //     }
        // }

        /// [isRandomizedEncryptionRequired](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#isRandomizedEncryptionRequired())
        pub fn is_randomized_encryption_required<'env>(&'env self) -> __jni_bindgen::Result<bool> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "isRandomizedEncryptionRequired", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "isRandomizedEncryptionRequired\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isUserAuthenticationRequired](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#isUserAuthenticationRequired())
        pub fn is_user_authentication_required<'env>(&'env self) -> __jni_bindgen::Result<bool> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "isUserAuthenticationRequired", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "isUserAuthenticationRequired\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isUserConfirmationRequired](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#isUserConfirmationRequired())
        pub fn is_user_confirmation_required<'env>(&'env self) -> __jni_bindgen::Result<bool> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "isUserConfirmationRequired", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "isUserConfirmationRequired\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getUserAuthenticationValidityDurationSeconds](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#getUserAuthenticationValidityDurationSeconds())
        pub fn get_user_authentication_validity_duration_seconds<'env>(&'env self) -> __jni_bindgen::Result<i32> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "getUserAuthenticationValidityDurationSeconds", .descriptor == "()I"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "getUserAuthenticationValidityDurationSeconds\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isUserPresenceRequired](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#isUserPresenceRequired())
        pub fn is_user_presence_required<'env>(&'env self) -> __jni_bindgen::Result<bool> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "isUserPresenceRequired", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "isUserPresenceRequired\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isUserAuthenticationValidWhileOnBody](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#isUserAuthenticationValidWhileOnBody())
        pub fn is_user_authentication_valid_while_on_body<'env>(&'env self) -> __jni_bindgen::Result<bool> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "isUserAuthenticationValidWhileOnBody", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "isUserAuthenticationValidWhileOnBody\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isInvalidatedByBiometricEnrollment](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#isInvalidatedByBiometricEnrollment())
        pub fn is_invalidated_by_biometric_enrollment<'env>(&'env self) -> __jni_bindgen::Result<bool> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "isInvalidatedByBiometricEnrollment", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "isInvalidatedByBiometricEnrollment\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isUnlockedDeviceRequired](https://developer.android.com/reference/android/security/keystore/KeyProtection.html#isUnlockedDeviceRequired())
        pub fn is_unlocked_device_required<'env>(&'env self) -> __jni_bindgen::Result<bool> {
            // class.path == "android/security/keystore/KeyProtection", java.flags == PUBLIC, .name == "isUnlockedDeviceRequired", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/security/keystore/KeyProtection\0", "isUnlockedDeviceRequired\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}