[Android] Audio : Intercept MediaPlayerTimeChanged event

Alexandre Perraud git at videolan.org
Wed Sep 17 15:45:39 CEST 2014


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Thu Sep 11 19:40:19 2014 +0200| [df95fae65e179e00e8b09ad7054b8e4479e01b16] | committer: Jean-Baptiste Kempf

Audio : Intercept MediaPlayerTimeChanged event

        Avoid useless and numerous error logs.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=df95fae65e179e00e8b09ad7054b8e4479e01b16
---

 vlc-android/src/org/videolan/vlc/audio/AudioService.java |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/audio/AudioService.java b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
index 6fef673..4ae263a 100644
--- a/vlc-android/src/org/videolan/vlc/audio/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
@@ -496,8 +496,11 @@ public class AudioService extends Service {
                     if (service.mWakeLock.isHeld())
                         service.mWakeLock.release();
                     break;
+                case EventHandler.MediaPlayerTimeChanged:
+                    // avoid useless error logs
+                    break;
                 default:
-                    Log.e(TAG, "Event not handled");
+                    Log.e(TAG, String.format("Event not handled (0x%x)", msg.getData().getInt("event")));
                     break;
             }
         }



More information about the Android mailing list