code: boolean updateState(State state) {
          if (isResetRequired) {
              // Applying initial state
              state.set(0f, 0f, zoomBounds.set(state).getFitZoom(), 0f);
              GravityUtils.getImagePosition(state, settings, tmpRect);
              state.translateTo(tmpRect.left, tmpRect.top);
  
              // We can correctly reset state only when we have both image size and viewport size
              // but there can be a delay before we have all values properly set
              // (waiting for layout or waiting for image to be loaded)
              isResetRequired = !settings.hasImageSize() || !settings.hasViewportSize();
              return !isResetRequired;
          } else {
              // Restricts state's translation and zoom bounds, disallowing overscroll / overzoom.
              restrictStateBounds(state, state, Float.NaN, Float.NaN, false, false, true);
              return false;
          }
      }
docs: Updates state (or resets state if reset was scheduled, see {@link #resetState(State)}).
  
  @param state State to be updated
  @return {@code true} if state was reset to initial state or {@code false} if state was
  updated.