diff options
Diffstat (limited to 'firmware/target/hosted/android')
| -rw-r--r-- | firmware/target/hosted/android/pcm-android.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/firmware/target/hosted/android/pcm-android.c b/firmware/target/hosted/android/pcm-android.c index cbd6cb3..3143bc9 100644 --- a/firmware/target/hosted/android/pcm-android.c +++ b/firmware/target/hosted/android/pcm-android.c @@ -224,16 +224,6 @@ void pcm_shutdown(void) e->CallVoidMethod(env_ptr, RockboxPCM_instance, release); pthread_mutex_destroy(&audio_lock_mutex); } - -/* Due to limitations of default_event_handler(), parameters gets swallowed when - * being posted with queue_broadcast(), so workaround this by caching the last - * value. - */ -static int lastPostedVolume = -1; -int hosted_get_volume(void) -{ - return lastPostedVolume; -} JNIEXPORT void JNICALL Java_org_rockbox_RockboxPCM_postVolumeChangedEvent(JNIEnv *env, @@ -242,10 +232,7 @@ Java_org_rockbox_RockboxPCM_postVolumeChangedEvent(JNIEnv *env, { (void) env; (void) this; - - if (volume != lastPostedVolume) - { - lastPostedVolume = volume; - queue_broadcast(SYS_VOLUME_CHANGED, 0); - } + /* for the main queue, the volume will be available through + * button_get_data() */ + queue_broadcast(SYS_VOLUME_CHANGED, volume); } |