Skip to content

Commit

Permalink
Register the overlay view as non-obstructing
Browse files Browse the repository at this point in the history
Currently IMA determines that the overlay is obstructing, even
if it's empty. Register it as friendly, which means we're
assuming that anything the apps puts in it is necessary for
playback.

PiperOrigin-RevId: 234963065
  • Loading branch information
andrewlewis committed Feb 21, 2019
1 parent af9a0a9 commit ea49e61
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.List;

/**
Expand Down Expand Up @@ -1117,7 +1118,14 @@ public ViewGroup getAdViewGroup() {

@Override
public View[] getAdOverlayViews() {
return controller != null ? new View[] {controller} : new View[0];
ArrayList<View> overlayViews = new ArrayList<>();
if (overlayFrameLayout != null) {
overlayViews.add(overlayFrameLayout);
}
if (controller != null) {
overlayViews.add(controller);
}
return overlayViews.toArray(new View[0]);
}

// Internal methods.
Expand Down

0 comments on commit ea49e61

Please sign in to comment.