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
// WARNING: This file was autogenerated by jni-bindgen. Any changes to this file may be lost!!!
#[cfg(any(feature = "all", feature = "android-os-PowerManager"))]
__jni_bindgen! {
/// public final class [PowerManager](https://developer.android.com/reference/android/os/PowerManager.html)
///
/// Required feature: "android-os-PowerManager"
public final class PowerManager ("android/os/PowerManager") extends crate::java::lang::Object {
/// [newWakeLock](https://developer.android.com/reference/android/os/PowerManager.html#newWakeLock(int,%20java.lang.String))
///
/// Required features: "android-os-PowerManager_WakeLock", "java-lang-String"
#[cfg(any(feature = "all", all(feature = "android-os-PowerManager_WakeLock", feature = "java-lang-String")))]
pub fn newWakeLock<'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::std::option::Option<__jni_bindgen::Local<'env, crate::android::os::PowerManager_WakeLock>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/os/PowerManager", java.flags == PUBLIC, .name == "newWakeLock", .descriptor == "(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;"
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/os/PowerManager\0", "newWakeLock\0", "(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;\0");
__jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [isWakeLockLevelSupported](https://developer.android.com/reference/android/os/PowerManager.html#isWakeLockLevelSupported(int))
pub fn isWakeLockLevelSupported<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/os/PowerManager", java.flags == PUBLIC, .name == "isWakeLockLevelSupported", .descriptor == "(I)Z"
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/os/PowerManager\0", "isWakeLockLevelSupported\0", "(I)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [isScreenOn](https://developer.android.com/reference/android/os/PowerManager.html#isScreenOn())
#[deprecated] pub fn isScreenOn<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/os/PowerManager", java.flags == PUBLIC, .name == "isScreenOn", .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/os/PowerManager\0", "isScreenOn\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [isInteractive](https://developer.android.com/reference/android/os/PowerManager.html#isInteractive())
pub fn isInteractive<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/os/PowerManager", java.flags == PUBLIC, .name == "isInteractive", .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/os/PowerManager\0", "isInteractive\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [reboot](https://developer.android.com/reference/android/os/PowerManager.html#reboot(java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn reboot<'env>(&'env self, arg0: 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/os/PowerManager", java.flags == PUBLIC, .name == "reboot", .descriptor == "(Ljava/lang/String;)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/os/PowerManager\0", "reboot\0", "(Ljava/lang/String;)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [isPowerSaveMode](https://developer.android.com/reference/android/os/PowerManager.html#isPowerSaveMode())
pub fn isPowerSaveMode<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/os/PowerManager", java.flags == PUBLIC, .name == "isPowerSaveMode", .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/os/PowerManager\0", "isPowerSaveMode\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [isDeviceIdleMode](https://developer.android.com/reference/android/os/PowerManager.html#isDeviceIdleMode())
pub fn isDeviceIdleMode<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/os/PowerManager", java.flags == PUBLIC, .name == "isDeviceIdleMode", .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/os/PowerManager\0", "isDeviceIdleMode\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [isIgnoringBatteryOptimizations](https://developer.android.com/reference/android/os/PowerManager.html#isIgnoringBatteryOptimizations(java.lang.String))
///
/// Required features: "java-lang-String"
#[cfg(any(feature = "all", all(feature = "java-lang-String")))]
pub fn isIgnoringBatteryOptimizations<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/os/PowerManager", java.flags == PUBLIC, .name == "isIgnoringBatteryOptimizations", .descriptor == "(Ljava/lang/String;)Z"
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/os/PowerManager\0", "isIgnoringBatteryOptimizations\0", "(Ljava/lang/String;)Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [isSustainedPerformanceModeSupported](https://developer.android.com/reference/android/os/PowerManager.html#isSustainedPerformanceModeSupported())
pub fn isSustainedPerformanceModeSupported<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/os/PowerManager", java.flags == PUBLIC, .name == "isSustainedPerformanceModeSupported", .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/os/PowerManager\0", "isSustainedPerformanceModeSupported\0", "()Z\0");
__jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// public static final [ACQUIRE_CAUSES_WAKEUP](https://developer.android.com/reference/android/os/PowerManager.html#ACQUIRE_CAUSES_WAKEUP)
pub const ACQUIRE_CAUSES_WAKEUP : i32 = 268435456;
/// public static final [ACTION_DEVICE_IDLE_MODE_CHANGED](https://developer.android.com/reference/android/os/PowerManager.html#ACTION_DEVICE_IDLE_MODE_CHANGED)
pub const ACTION_DEVICE_IDLE_MODE_CHANGED : &'static str = "android.os.action.DEVICE_IDLE_MODE_CHANGED";
/// public static final [ACTION_POWER_SAVE_MODE_CHANGED](https://developer.android.com/reference/android/os/PowerManager.html#ACTION_POWER_SAVE_MODE_CHANGED)
pub const ACTION_POWER_SAVE_MODE_CHANGED : &'static str = "android.os.action.POWER_SAVE_MODE_CHANGED";
/// public static final [FULL_WAKE_LOCK](https://developer.android.com/reference/android/os/PowerManager.html#FULL_WAKE_LOCK)
#[deprecated] pub const FULL_WAKE_LOCK : i32 = 26;
/// public static final [ON_AFTER_RELEASE](https://developer.android.com/reference/android/os/PowerManager.html#ON_AFTER_RELEASE)
pub const ON_AFTER_RELEASE : i32 = 536870912;
/// public static final [PARTIAL_WAKE_LOCK](https://developer.android.com/reference/android/os/PowerManager.html#PARTIAL_WAKE_LOCK)
pub const PARTIAL_WAKE_LOCK : i32 = 1;
/// public static final [PROXIMITY_SCREEN_OFF_WAKE_LOCK](https://developer.android.com/reference/android/os/PowerManager.html#PROXIMITY_SCREEN_OFF_WAKE_LOCK)
pub const PROXIMITY_SCREEN_OFF_WAKE_LOCK : i32 = 32;
/// public static final [RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY](https://developer.android.com/reference/android/os/PowerManager.html#RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY)
pub const RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY : i32 = 1;
/// public static final [SCREEN_BRIGHT_WAKE_LOCK](https://developer.android.com/reference/android/os/PowerManager.html#SCREEN_BRIGHT_WAKE_LOCK)
#[deprecated] pub const SCREEN_BRIGHT_WAKE_LOCK : i32 = 10;
/// public static final [SCREEN_DIM_WAKE_LOCK](https://developer.android.com/reference/android/os/PowerManager.html#SCREEN_DIM_WAKE_LOCK)
#[deprecated] pub const SCREEN_DIM_WAKE_LOCK : i32 = 6;
}
}