diff options
| author | Antoine Cellerier <dionoea@videolan.org> | 2011-01-29 20:47:32 +0000 |
|---|---|---|
| committer | Antoine Cellerier <dionoea@videolan.org> | 2011-01-29 20:47:32 +0000 |
| commit | c0c769c5a86c56c2ab2c9e88515a64da98575182 (patch) | |
| tree | 24e84b2d146bf3da39d93983d5656061e3c88ecb /apps | |
| parent | e9749d1b93f23b3bc36305ad1d39ca5e5c0cb3a8 (diff) | |
| download | rockbox-c0c769c5a86c56c2ab2c9e88515a64da98575182.zip rockbox-c0c769c5a86c56c2ab2c9e88515a64da98575182.tar.gz rockbox-c0c769c5a86c56c2ab2c9e88515a64da98575182.tar.bz2 rockbox-c0c769c5a86c56c2ab2c9e88515a64da98575182.tar.xz | |
Add widgets to android port.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29170 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/hosted/notification.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/hosted/notification.c b/apps/hosted/notification.c index 3c623aa..fa8c286 100644 --- a/apps/hosted/notification.c +++ b/apps/hosted/notification.c @@ -30,7 +30,7 @@ extern JNIEnv *env_ptr; extern jclass RockboxService_class; extern jobject RockboxService_instance; -static jmethodID updateNotification; +static jmethodID updateNotification, finishNotification; static jobject NotificationManager_instance; static jstring title, artist, album; @@ -66,6 +66,16 @@ static void track_changed_callback(void *param) } } +/* + * notify about track finishing */ +static void track_finished_callback(void *param) +{ + (void)param; + JNIEnv e = *env_ptr; + e->CallVoidMethod(env_ptr, NotificationManager_instance, + finishNotification); +} + void notification_init(void) { JNIEnv e = *env_ptr; @@ -79,6 +89,9 @@ void notification_init(void) "(Ljava/lang/String;" "Ljava/lang/String;" "Ljava/lang/String;)V"); + finishNotification = e->GetMethodID(env_ptr, class, "finishNotification", + "()V"); add_event(PLAYBACK_EVENT_TRACK_CHANGE, false, track_changed_callback); + add_event(PLAYBACK_EVENT_TRACK_FINISH, false, track_finished_callback); } |