@@ -111,7 +111,9 @@ public void testPrepareAndPlay () throws Exception {
111111 @ Override
112112 public boolean sendEvent (Enum eventCategory , Enum eventId , Object ... params ) {
113113 super .sendEvent (eventCategory , eventId , params );
114-
114+ if ("ON_FOCUS_GAINED" .equals (eventId .name ()) || "ON_FOCUS_LOST" .equals (eventId .name ())) {
115+ return true ;
116+ }
115117 if (allowEvents ) {
116118 EVENT_CATEGORIES .add (eventCategory );
117119 EVENTS .add (eventId );
@@ -172,7 +174,9 @@ public void testPrepareAndPlayNonExistingUrl () throws Exception {
172174 @ Override
173175 public boolean sendEvent (Enum eventCategory , Enum eventId , Object ... params ) {
174176 super .sendEvent (eventCategory , eventId , params );
175-
177+ if ("ON_FOCUS_GAINED" .equals (eventId .name ()) || "ON_FOCUS_LOST" .equals (eventId .name ())) {
178+ return true ;
179+ }
176180 if (allowEvents ) {
177181 EVENT_CATEGORIES .add (eventCategory );
178182 EVENTS .add (eventId );
@@ -235,6 +239,10 @@ public void testPreparePlaySeekToPause () throws Exception {
235239 public boolean sendEvent (Enum eventCategory , Enum eventId , Object ... params ) {
236240 super .sendEvent (eventCategory , eventId , params );
237241
242+ if ("ON_FOCUS_GAINED" .equals (eventId .name ()) || "ON_FOCUS_LOST" .equals (eventId .name ())) {
243+ return true ;
244+ }
245+
238246 EVENT_CATEGORIES .add (eventCategory );
239247 EVENTS .add (eventId );
240248 EVENT_PARAMS = params ;
@@ -294,6 +302,10 @@ public void testPreparePlayStop () throws Exception {
294302 public boolean sendEvent (Enum eventCategory , Enum eventId , Object ... params ) {
295303 super .sendEvent (eventCategory , eventId , params );
296304
305+ if ("ON_FOCUS_GAINED" .equals (eventId .name ()) || "ON_FOCUS_LOST" .equals (eventId .name ())) {
306+ return true ;
307+ }
308+
297309 EVENT_CATEGORIES .add (eventCategory );
298310 EVENTS .add (eventId );
299311 EVENT_PARAMS = params ;
@@ -350,6 +362,10 @@ public void testPreparePlaySetVolumePause () throws Exception {
350362 public boolean sendEvent (Enum eventCategory , Enum eventId , Object ... params ) {
351363 super .sendEvent (eventCategory , eventId , params );
352364
365+ if ("ON_FOCUS_GAINED" .equals (eventId .name ()) || "ON_FOCUS_LOST" .equals (eventId .name ())) {
366+ return true ;
367+ }
368+
353369 EVENT_CATEGORIES .add (eventCategory );
354370 EVENTS .add (eventId );
355371 EVENT_PARAMS = params ;
@@ -410,6 +426,10 @@ public void testSetProgressInterval () throws Exception {
410426 public boolean sendEvent (Enum eventCategory , Enum eventId , Object ... params ) {
411427 super .sendEvent (eventCategory , eventId , params );
412428
429+ if ("ON_FOCUS_GAINED" .equals (eventId .name ()) || "ON_FOCUS_LOST" .equals (eventId .name ())) {
430+ return true ;
431+ }
432+
413433 EVENT_CATEGORIES .add (eventCategory );
414434 EVENTS .add (eventId );
415435 EVENT_PARAMS = params ;
@@ -489,6 +509,10 @@ public void testPreparePlayPause () throws Exception {
489509 public boolean sendEvent (Enum eventCategory , Enum eventId , Object ... params ) {
490510 super .sendEvent (eventCategory , eventId , params );
491511
512+ if ("ON_FOCUS_GAINED" .equals (eventId .name ()) || "ON_FOCUS_LOST" .equals (eventId .name ())) {
513+ return true ;
514+ }
515+
492516 EVENT_CATEGORIES .add (eventCategory );
493517 EVENTS .add (eventId );
494518 EVENT_PARAMS = params ;
@@ -546,6 +570,10 @@ public void testInfoListener () throws Exception {
546570 public boolean sendEvent (Enum eventCategory , Enum eventId , Object ... params ) {
547571 super .sendEvent (eventCategory , eventId , params );
548572
573+ if ("ON_FOCUS_GAINED" .equals (eventId .name ()) || "ON_FOCUS_LOST" .equals (eventId .name ())) {
574+ return true ;
575+ }
576+
549577 EVENT_CATEGORIES .add (eventCategory );
550578 EVENTS .add (eventId );
551579 EVENT_PARAMS = params ;
@@ -607,6 +635,10 @@ public void testDisableInfoListener () throws Exception {
607635 public boolean sendEvent (Enum eventCategory , Enum eventId , Object ... params ) {
608636 super .sendEvent (eventCategory , eventId , params );
609637
638+ if ("ON_FOCUS_GAINED" .equals (eventId .name ()) || "ON_FOCUS_LOST" .equals (eventId .name ())) {
639+ return true ;
640+ }
641+
610642 EVENT_CATEGORIES .add (eventCategory );
611643 EVENTS .add (eventId );
612644 EVENT_PARAMS = params ;
@@ -669,6 +701,10 @@ public void testEnableInfoListener () throws Exception {
669701 public boolean sendEvent (Enum eventCategory , Enum eventId , Object ... params ) {
670702 super .sendEvent (eventCategory , eventId , params );
671703
704+ if ("ON_FOCUS_GAINED" .equals (eventId .name ()) || "ON_FOCUS_LOST" .equals (eventId .name ())) {
705+ return true ;
706+ }
707+
672708 EVENT_CATEGORIES .add (eventCategory );
673709 EVENTS .add (eventId );
674710 EVENT_PARAMS = params ;
0 commit comments