diff options
| author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2011-03-11 19:23:00 +0000 |
|---|---|---|
| committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2011-03-11 19:23:00 +0000 |
| commit | c2ee32b22aa50101fc092f610927cfbdd9a2d8f1 (patch) | |
| tree | 9104a62064dda0643c9604c63dee83a74c489d91 /apps/hosted/android/notification.c | |
| parent | 66f2a08f8a37933b9eff79ceabdc2cb42706e48c (diff) | |
| download | rockbox-c2ee32b22aa50101fc092f610927cfbdd9a2d8f1.zip rockbox-c2ee32b22aa50101fc092f610927cfbdd9a2d8f1.tar.gz rockbox-c2ee32b22aa50101fc092f610927cfbdd9a2d8f1.tar.bz2 rockbox-c2ee32b22aa50101fc092f610927cfbdd9a2d8f1.tar.xz | |
Partly revert "Android: use NewGlobalRef for references that are used globally"
The added complexity wasn't needed for most subsystems, as main() never returns
so local references can't be freed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29570 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, 3 insertions, 4 deletions
diff --git a/apps/hosted/android/notification.c b/apps/hosted/android/notification.c index 1c89c51..e7c425b 100644 --- a/apps/hosted/android/notification.c +++ b/apps/hosted/android/notification.c @@ -128,14 +128,13 @@ void notification_init(void) JNIEnv e = *env_ptr; jfieldID nNM = e->GetFieldID(env_ptr, RockboxService_class, "fg_runner", "Lorg/rockbox/Helper/RunForegroundManager;"); - jobject nMN_instance = e->GetObjectField(env_ptr, - RockboxService_instance, nNM); - if (nMN_instance == NULL) + NotificationManager_instance = e->GetObjectField(env_ptr, + RockboxService_instance, nNM); + if (NotificationManager_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", |