Esempio n. 1
0
 @Override
 protected void onWindowVisibilityChanged(final int visibility) {
   // Ignore transitions between View.GONE and View.INVISIBLE
   if (Visibility.hasScreenVisibilityChanged(mScreenVisibility, visibility)) {
     mScreenVisibility = visibility;
     setAdVisibility(mScreenVisibility);
   }
 }
Esempio n. 2
0
  private void setAdVisibility(final int visibility) {
    if (mAdViewController == null) {
      return;
    }

    if (Visibility.isScreenVisible(visibility)) {
      mAdViewController.unpauseRefresh();
    } else {
      mAdViewController.pauseRefresh();
    }
  }