diff options
| author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2011-03-11 18:34:31 +0000 |
|---|---|---|
| committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2011-03-11 18:34:31 +0000 |
| commit | 2e5b7aebde6426058ea7b69424b0335a844a6a18 (patch) | |
| tree | 2ce54c30eb646b1d78d38ff34ff3eb3f76955bff /apps/hosted/android/notification.c | |
| parent | 7228f2fa9faf587bab51f2e3c1727b7ca962b441 (diff) | |
| download | rockbox-2e5b7aebde6426058ea7b69424b0335a844a6a18.zip rockbox-2e5b7aebde6426058ea7b69424b0335a844a6a18.tar.gz rockbox-2e5b7aebde6426058ea7b69424b0335a844a6a18.tar.bz2 rockbox-2e5b7aebde6426058ea7b69424b0335a844a6a18.tar.xz | |
Android: use NewGlobalRef for references that are used globally
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29568 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/hosted/android/notification.c')
| -rw-r--r-- | apps/hosted/android/notification.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/hosted/android/notification.c b/apps/hosted/android/notification.c index 4432006..33a7717 100644 --- a/apps/hosted/android/notification.c +++ b/apps/hosted/android/notification.c @@ -125,13 +125,14 @@ void notification_init(void) JNIEnv e = *env_ptr; jfieldID nNM = e->GetFieldID(env_ptr, RockboxService_class, "fg_runner", "Lorg/rockbox/Helper/RunForegroundManager;"); - NotificationManager_instance = e->GetObjectField(env_ptr, - RockboxService_instance, nNM); - if (NotificationManager_instance == NULL) + jobject nMN_instance = e->GetObjectField(env_ptr, + RockboxService_instance, nNM); + if (nMN_instance == NULL) { DEBUGF("Failed to get RunForegroundManager instance. Performance will be bad"); return; } + NotificationManager_instance = e->NewGlobalRef(env_ptr, nMN_instance); jclass class = e->GetObjectClass(env_ptr, NotificationManager_instance); updateNotification = e->GetMethodID(env_ptr, class, "updateNotification", |