summaryrefslogtreecommitdiff
path: root/apps/hosted/android/notification.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/hosted/android/notification.c')
-rw-r--r--apps/hosted/android/notification.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/hosted/android/notification.c b/apps/hosted/android/notification.c
index 1c89c51357..e7c425b7c1 100644
--- a/apps/hosted/android/notification.c
+++ b/apps/hosted/android/notification.c
@@ -128,14 +128,13 @@ void notification_init(void)
128 JNIEnv e = *env_ptr; 128 JNIEnv e = *env_ptr;
129 jfieldID nNM = e->GetFieldID(env_ptr, RockboxService_class, 129 jfieldID nNM = e->GetFieldID(env_ptr, RockboxService_class,
130 "fg_runner", "Lorg/rockbox/Helper/RunForegroundManager;"); 130 "fg_runner", "Lorg/rockbox/Helper/RunForegroundManager;");
131 jobject nMN_instance = e->GetObjectField(env_ptr, 131 NotificationManager_instance = e->GetObjectField(env_ptr,
132 RockboxService_instance, nNM); 132 RockboxService_instance, nNM);
133 if (nMN_instance == NULL) 133 if (NotificationManager_instance == NULL)
134 { 134 {
135 DEBUGF("Failed to get RunForegroundManager instance. Performance will be bad"); 135 DEBUGF("Failed to get RunForegroundManager instance. Performance will be bad");
136 return; 136 return;
137 } 137 }
138 NotificationManager_instance = e->NewGlobalRef(env_ptr, nMN_instance);
139 138
140 jclass class = e->GetObjectClass(env_ptr, NotificationManager_instance); 139 jclass class = e->GetObjectClass(env_ptr, NotificationManager_instance);
141 updateNotification = e->GetMethodID(env_ptr, class, "updateNotification", 140 updateNotification = e->GetMethodID(env_ptr, class, "updateNotification",