code: private boolean shouldAnimate() {
          if (!mAnimationEnabled) {
              return false;
          }
          Display display = currentDisplay();
          if (display == null) {
              return false;
          }
          if (mVisibleStartTime <= 0) {
              return false;
          }
          long threshold = (long) (1000 / display.getRefreshRate());
          long millisVisible = elapsedRealtime() - mVisibleStartTime;
          return millisVisible > threshold;
      }
docs: Returns whether now is an appropriate time to perform animations.