diff options
Diffstat (limited to 'apps/hosted/android/notification.c')
-rw-r--r-- | apps/hosted/android/notification.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/hosted/android/notification.c b/apps/hosted/android/notification.c index e7c425b7c1..443200698c 100644 --- a/apps/hosted/android/notification.c +++ b/apps/hosted/android/notification.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include "misc.h" | 29 | #include "misc.h" |
30 | #include "thread.h" | 30 | #include "thread.h" |
31 | #include "debug.h" | 31 | #include "debug.h" |
32 | #include "system.h" | ||
33 | 32 | ||
33 | extern JNIEnv *env_ptr; | ||
34 | extern jclass RockboxService_class; | 34 | extern jclass RockboxService_class; |
35 | extern jobject RockboxService_instance; | 35 | extern jobject RockboxService_instance; |
36 | 36 | ||
@@ -47,7 +47,6 @@ static const struct dim dim = { .width = 200, .height = 200 }; | |||
47 | static void track_changed_callback(void *param) | 47 | static void track_changed_callback(void *param) |
48 | { | 48 | { |
49 | struct mp3entry* id3 = (struct mp3entry*)param; | 49 | struct mp3entry* id3 = (struct mp3entry*)param; |
50 | JNIEnv *env_ptr = getJavaEnvironment(); | ||
51 | JNIEnv e = *env_ptr; | 50 | JNIEnv e = *env_ptr; |
52 | if (id3) | 51 | if (id3) |
53 | { | 52 | { |
@@ -110,7 +109,6 @@ static void track_changed_callback(void *param) | |||
110 | static void track_finished_callback(void *param) | 109 | static void track_finished_callback(void *param) |
111 | { | 110 | { |
112 | (void)param; | 111 | (void)param; |
113 | JNIEnv *env_ptr = getJavaEnvironment(); | ||
114 | JNIEnv e = *env_ptr; | 112 | JNIEnv e = *env_ptr; |
115 | e->CallVoidMethod(env_ptr, NotificationManager_instance, | 113 | e->CallVoidMethod(env_ptr, NotificationManager_instance, |
116 | finishNotification); | 114 | finishNotification); |
@@ -124,7 +122,6 @@ static void track_finished_callback(void *param) | |||
124 | 122 | ||
125 | void notification_init(void) | 123 | void notification_init(void) |
126 | { | 124 | { |
127 | JNIEnv *env_ptr = getJavaEnvironment(); | ||
128 | JNIEnv e = *env_ptr; | 125 | JNIEnv e = *env_ptr; |
129 | jfieldID nNM = e->GetFieldID(env_ptr, RockboxService_class, | 126 | jfieldID nNM = e->GetFieldID(env_ptr, RockboxService_class, |
130 | "fg_runner", "Lorg/rockbox/Helper/RunForegroundManager;"); | 127 | "fg_runner", "Lorg/rockbox/Helper/RunForegroundManager;"); |