[Android] [PATCH 2/5] Audio : Intercept MediaPlayerTimeChanged event

Alexandre Perraud 4leyx4ndre at gmail.com
Thu Sep 11 19:40:19 CEST 2014


        Avoid useless and numerous error logs.
---
 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;
             }
         }
-- 
1.9.1



More information about the Android mailing list