diff options
Diffstat (limited to 'firmware/target/hosted/android/powermgmt-android.c')
-rw-r--r-- | firmware/target/hosted/android/powermgmt-android.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/firmware/target/hosted/android/powermgmt-android.c b/firmware/target/hosted/android/powermgmt-android.c index 222212f9c8..d23fece39a 100644 --- a/firmware/target/hosted/android/powermgmt-android.c +++ b/firmware/target/hosted/android/powermgmt-android.c | |||
@@ -23,8 +23,8 @@ | |||
23 | #include <jni.h> | 23 | #include <jni.h> |
24 | #include <stdbool.h> | 24 | #include <stdbool.h> |
25 | #include "config.h" | 25 | #include "config.h" |
26 | #include "system.h" | ||
27 | 26 | ||
27 | extern JNIEnv *env_ptr; | ||
28 | extern jclass RockboxService_class; | 28 | extern jclass RockboxService_class; |
29 | extern jobject RockboxService_instance; | 29 | extern jobject RockboxService_instance; |
30 | 30 | ||
@@ -32,8 +32,6 @@ static jfieldID _battery_level; | |||
32 | 32 | ||
33 | void powermgmt_init_target(void) | 33 | void powermgmt_init_target(void) |
34 | { | 34 | { |
35 | JNIEnv *env_ptr = getJavaEnvironment(); | ||
36 | |||
37 | jmethodID initBatteryMonitor = (*env_ptr)->GetMethodID(env_ptr, | 35 | jmethodID initBatteryMonitor = (*env_ptr)->GetMethodID(env_ptr, |
38 | RockboxService_class, | 36 | RockboxService_class, |
39 | "initBatteryMonitor", | 37 | "initBatteryMonitor", |
@@ -52,8 +50,6 @@ void powermgmt_init_target(void) | |||
52 | 50 | ||
53 | int battery_level(void) | 51 | int battery_level(void) |
54 | { | 52 | { |
55 | JNIEnv *env_ptr = getJavaEnvironment(); | ||
56 | |||
57 | return (*env_ptr)->GetIntField(env_ptr, RockboxService_instance, _battery_level); | 53 | return (*env_ptr)->GetIntField(env_ptr, RockboxService_instance, _battery_level); |
58 | } | 54 | } |
59 | 55 | ||