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
// WARNING: This file was autogenerated by jni-bindgen. Any changes to this file may be lost!!!
#[cfg(any(feature = "all", feature = "android-os-BatteryManager"))]
__jni_bindgen! {
/// public class [BatteryManager](https://developer.android.com/reference/android/os/BatteryManager.html)
///
/// Required feature: "android-os-BatteryManager"
public class BatteryManager ("android/os/BatteryManager") extends crate::java::lang::Object {
/// [BatteryManager](https://developer.android.com/reference/android/os/BatteryManager.html#BatteryManager())
pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::android::os::BatteryManager>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/os/BatteryManager", java.flags == PUBLIC, .name == "<init>", .descriptor == "()V"
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_method("android/os/BatteryManager\0", "<init>\0", "()V\0");
__jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
/// [getIntProperty](https://developer.android.com/reference/android/os/BatteryManager.html#getIntProperty(int))
pub fn getIntProperty<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/os/BatteryManager", java.flags == PUBLIC, .name == "getIntProperty", .descriptor == "(I)I"
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/BatteryManager\0", "getIntProperty\0", "(I)I\0");
__jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// [getLongProperty](https://developer.android.com/reference/android/os/BatteryManager.html#getLongProperty(int))
pub fn getLongProperty<'env>(&'env self, arg0: i32) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "android/os/BatteryManager", java.flags == PUBLIC, .name == "getLongProperty", .descriptor == "(I)J"
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/BatteryManager\0", "getLongProperty\0", "(I)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
/// public static final [BATTERY_HEALTH_COLD](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_HEALTH_COLD)
pub const BATTERY_HEALTH_COLD : i32 = 7;
/// public static final [BATTERY_HEALTH_DEAD](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_HEALTH_DEAD)
pub const BATTERY_HEALTH_DEAD : i32 = 4;
/// public static final [BATTERY_HEALTH_GOOD](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_HEALTH_GOOD)
pub const BATTERY_HEALTH_GOOD : i32 = 2;
/// public static final [BATTERY_HEALTH_OVERHEAT](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_HEALTH_OVERHEAT)
pub const BATTERY_HEALTH_OVERHEAT : i32 = 3;
/// public static final [BATTERY_HEALTH_OVER_VOLTAGE](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_HEALTH_OVER_VOLTAGE)
pub const BATTERY_HEALTH_OVER_VOLTAGE : i32 = 5;
/// public static final [BATTERY_HEALTH_UNKNOWN](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_HEALTH_UNKNOWN)
pub const BATTERY_HEALTH_UNKNOWN : i32 = 1;
/// public static final [BATTERY_HEALTH_UNSPECIFIED_FAILURE](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_HEALTH_UNSPECIFIED_FAILURE)
pub const BATTERY_HEALTH_UNSPECIFIED_FAILURE : i32 = 6;
/// public static final [BATTERY_PLUGGED_AC](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_PLUGGED_AC)
pub const BATTERY_PLUGGED_AC : i32 = 1;
/// public static final [BATTERY_PLUGGED_USB](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_PLUGGED_USB)
pub const BATTERY_PLUGGED_USB : i32 = 2;
/// public static final [BATTERY_PLUGGED_WIRELESS](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_PLUGGED_WIRELESS)
pub const BATTERY_PLUGGED_WIRELESS : i32 = 4;
/// public static final [BATTERY_PROPERTY_CAPACITY](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_PROPERTY_CAPACITY)
pub const BATTERY_PROPERTY_CAPACITY : i32 = 4;
/// public static final [BATTERY_PROPERTY_CHARGE_COUNTER](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_PROPERTY_CHARGE_COUNTER)
pub const BATTERY_PROPERTY_CHARGE_COUNTER : i32 = 1;
/// public static final [BATTERY_PROPERTY_CURRENT_AVERAGE](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_PROPERTY_CURRENT_AVERAGE)
pub const BATTERY_PROPERTY_CURRENT_AVERAGE : i32 = 3;
/// public static final [BATTERY_PROPERTY_CURRENT_NOW](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_PROPERTY_CURRENT_NOW)
pub const BATTERY_PROPERTY_CURRENT_NOW : i32 = 2;
/// public static final [BATTERY_PROPERTY_ENERGY_COUNTER](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_PROPERTY_ENERGY_COUNTER)
pub const BATTERY_PROPERTY_ENERGY_COUNTER : i32 = 5;
/// public static final [BATTERY_STATUS_CHARGING](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_STATUS_CHARGING)
pub const BATTERY_STATUS_CHARGING : i32 = 2;
/// public static final [BATTERY_STATUS_DISCHARGING](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_STATUS_DISCHARGING)
pub const BATTERY_STATUS_DISCHARGING : i32 = 3;
/// public static final [BATTERY_STATUS_FULL](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_STATUS_FULL)
pub const BATTERY_STATUS_FULL : i32 = 5;
/// public static final [BATTERY_STATUS_NOT_CHARGING](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_STATUS_NOT_CHARGING)
pub const BATTERY_STATUS_NOT_CHARGING : i32 = 4;
/// public static final [BATTERY_STATUS_UNKNOWN](https://developer.android.com/reference/android/os/BatteryManager.html#BATTERY_STATUS_UNKNOWN)
pub const BATTERY_STATUS_UNKNOWN : i32 = 1;
/// public static final [EXTRA_HEALTH](https://developer.android.com/reference/android/os/BatteryManager.html#EXTRA_HEALTH)
pub const EXTRA_HEALTH : &'static str = "health";
/// public static final [EXTRA_ICON_SMALL](https://developer.android.com/reference/android/os/BatteryManager.html#EXTRA_ICON_SMALL)
pub const EXTRA_ICON_SMALL : &'static str = "icon-small";
/// public static final [EXTRA_LEVEL](https://developer.android.com/reference/android/os/BatteryManager.html#EXTRA_LEVEL)
pub const EXTRA_LEVEL : &'static str = "level";
/// public static final [EXTRA_PLUGGED](https://developer.android.com/reference/android/os/BatteryManager.html#EXTRA_PLUGGED)
pub const EXTRA_PLUGGED : &'static str = "plugged";
/// public static final [EXTRA_PRESENT](https://developer.android.com/reference/android/os/BatteryManager.html#EXTRA_PRESENT)
pub const EXTRA_PRESENT : &'static str = "present";
/// public static final [EXTRA_SCALE](https://developer.android.com/reference/android/os/BatteryManager.html#EXTRA_SCALE)
pub const EXTRA_SCALE : &'static str = "scale";
/// public static final [EXTRA_STATUS](https://developer.android.com/reference/android/os/BatteryManager.html#EXTRA_STATUS)
pub const EXTRA_STATUS : &'static str = "status";
/// public static final [EXTRA_TECHNOLOGY](https://developer.android.com/reference/android/os/BatteryManager.html#EXTRA_TECHNOLOGY)
pub const EXTRA_TECHNOLOGY : &'static str = "technology";
/// public static final [EXTRA_TEMPERATURE](https://developer.android.com/reference/android/os/BatteryManager.html#EXTRA_TEMPERATURE)
pub const EXTRA_TEMPERATURE : &'static str = "temperature";
/// public static final [EXTRA_VOLTAGE](https://developer.android.com/reference/android/os/BatteryManager.html#EXTRA_VOLTAGE)
pub const EXTRA_VOLTAGE : &'static str = "voltage";
}
}