// WARNING: This file was autogenerated by jni-bindgen. Any changes to this file may be lost!!!
#[cfg(any(feature = "all", feature = "android-app-AppOpsManager"))]
__jni_bindgen! {
/// public class [AppOpsManager](https://developer.android.com/reference/android/app/AppOpsManager.html)
///
/// Required feature: "android-app-AppOpsManager"
public class AppOpsManager ("android/app/AppOpsManager") extends crate::java::lang::Object {
/// [startWatchingMode](https://developer.android.com/reference/android/app/AppOpsManager.html#startWatchingMode(java.lang.String,%20java.lang.String,%20android.app.AppOpsManager.OnOpChangedListener))
///
/// Required features: "android-app-AppOpsManager_OnOpChangedListener", "java-lang-String"
#[cfg(any(feature = "all", all(feature = "android-app-AppOpsManager_OnOpChangedListener", feature = "java-lang-String")))]
pub fn startWatchingMode<'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::java::lang::String>>, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::AppOpsManager_OnOpChangedListener>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/AppOpsManager", java.flags == PUBLIC, .name == "startWatchingMode", .descriptor == "(Ljava/lang/String;Ljava/lang/String;Landroid/app/AppOpsManager$OnOpChangedListener;)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())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/AppOpsManager\0", "startWatchingMode\0", "(Ljava/lang/String;Ljava/lang/String;Landroid/app/AppOpsManager$OnOpChangedListener;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [stopWatchingMode](https://developer.android.com/reference/android/app/AppOpsManager.html#stopWatchingMode(android.app.AppOpsManager.OnOpChangedListener))
///
/// Required features: "android-app-AppOpsManager_OnOpChangedListener"
#[cfg(any(feature = "all", all(feature = "android-app-AppOpsManager_OnOpChangedListener")))]
pub fn stopWatchingMode<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::app::AppOpsManager_OnOpChangedListener>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/AppOpsManager", java.flags == PUBLIC, .name == "stopWatchingMode", .descriptor == "(Landroid/app/AppOpsManager$OnOpChangedListener;)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/app/AppOpsManager\0", "stopWatchingMode\0", "(Landroid/app/AppOpsManager$OnOpChangedListener;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [checkOp](https://developer.android.com/reference/android/app/AppOpsManager.html#checkOp(java.lang.String,%20int,%20java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn checkOp<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/AppOpsManager", java.flags == PUBLIC, .name == "checkOp", .descriptor == "(Ljava/lang/String;ILjava/lang/String;)I"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/AppOpsManager\0", "checkOp\0", "(Ljava/lang/String;ILjava/lang/String;)I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [checkOpNoThrow](https://developer.android.com/reference/android/app/AppOpsManager.html#checkOpNoThrow(java.lang.String,%20int,%20java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn checkOpNoThrow<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/AppOpsManager", java.flags == PUBLIC, .name == "checkOpNoThrow", .descriptor == "(Ljava/lang/String;ILjava/lang/String;)I"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/AppOpsManager\0", "checkOpNoThrow\0", "(Ljava/lang/String;ILjava/lang/String;)I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [noteOp](https://developer.android.com/reference/android/app/AppOpsManager.html#noteOp(java.lang.String,%20int,%20java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn noteOp<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/AppOpsManager", java.flags == PUBLIC, .name == "noteOp", .descriptor == "(Ljava/lang/String;ILjava/lang/String;)I"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/AppOpsManager\0", "noteOp\0", "(Ljava/lang/String;ILjava/lang/String;)I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [noteOpNoThrow](https://developer.android.com/reference/android/app/AppOpsManager.html#noteOpNoThrow(java.lang.String,%20int,%20java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn noteOpNoThrow<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/AppOpsManager", java.flags == PUBLIC, .name == "noteOpNoThrow", .descriptor == "(Ljava/lang/String;ILjava/lang/String;)I"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/AppOpsManager\0", "noteOpNoThrow\0", "(Ljava/lang/String;ILjava/lang/String;)I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [startOp](https://developer.android.com/reference/android/app/AppOpsManager.html#startOp(java.lang.String,%20int,%20java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn startOp<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/AppOpsManager", java.flags == PUBLIC, .name == "startOp", .descriptor == "(Ljava/lang/String;ILjava/lang/String;)I"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/AppOpsManager\0", "startOp\0", "(Ljava/lang/String;ILjava/lang/String;)I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [startOpNoThrow](https://developer.android.com/reference/android/app/AppOpsManager.html#startOpNoThrow(java.lang.String,%20int,%20java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn startOpNoThrow<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/AppOpsManager", java.flags == PUBLIC, .name == "startOpNoThrow", .descriptor == "(Ljava/lang/String;ILjava/lang/String;)I"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/AppOpsManager\0", "startOpNoThrow\0", "(Ljava/lang/String;ILjava/lang/String;)I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [finishOp](https://developer.android.com/reference/android/app/AppOpsManager.html#finishOp(java.lang.String,%20int,%20java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn finishOp<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/AppOpsManager", java.flags == PUBLIC, .name == "finishOp", .descriptor == "(Ljava/lang/String;ILjava/lang/String;)V"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/app/AppOpsManager\0", "finishOp\0", "(Ljava/lang/String;ILjava/lang/String;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [checkPackage](https://developer.android.com/reference/android/app/AppOpsManager.html#checkPackage(int,%20java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn checkPackage<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/app/AppOpsManager", java.flags == PUBLIC, .name == "checkPackage", .descriptor == "(ILjava/lang/String;)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/app/AppOpsManager\0", "checkPackage\0", "(ILjava/lang/String;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// public static final [MODE_ALLOWED](https://developer.android.com/reference/android/app/AppOpsManager.html#MODE_ALLOWED)
pub const MODE_ALLOWED : i32 = 0;
/// public static final [MODE_DEFAULT](https://developer.android.com/reference/android/app/AppOpsManager.html#MODE_DEFAULT)
pub const MODE_DEFAULT : i32 = 3;
/// public static final [MODE_ERRORED](https://developer.android.com/reference/android/app/AppOpsManager.html#MODE_ERRORED)
pub const MODE_ERRORED : i32 = 2;
/// public static final [MODE_IGNORED](https://developer.android.com/reference/android/app/AppOpsManager.html#MODE_IGNORED)
pub const MODE_IGNORED : i32 = 1;
/// public static final [OPSTR_COARSE_LOCATION](https://developer.android.com/reference/android/app/AppOpsManager.html#OPSTR_COARSE_LOCATION)
pub const OPSTR_COARSE_LOCATION : &'static str = "android:coarse_location";
/// public static final [OPSTR_FINE_LOCATION](https://developer.android.com/reference/android/app/AppOpsManager.html#OPSTR_FINE_LOCATION)
pub const OPSTR_FINE_LOCATION : &'static str = "android:fine_location";
/// public static final [OPSTR_GET_USAGE_STATS](https://developer.android.com/reference/android/app/AppOpsManager.html#OPSTR_GET_USAGE_STATS)
pub const OPSTR_GET_USAGE_STATS : &'static str = "android:get_usage_stats";
/// public static final [OPSTR_MONITOR_HIGH_POWER_LOCATION](https://developer.android.com/reference/android/app/AppOpsManager.html#OPSTR_MONITOR_HIGH_POWER_LOCATION)
pub const OPSTR_MONITOR_HIGH_POWER_LOCATION : &'static str = "android:monitor_location_high_power";
/// public static final [OPSTR_MONITOR_LOCATION](https://developer.android.com/reference/android/app/AppOpsManager.html#OPSTR_MONITOR_LOCATION)
pub const OPSTR_MONITOR_LOCATION : &'static str = "android:monitor_location";
}
}