docs: protected void animateOffsetTo(int position, int velocity, boolean animate) {
          endDrag();
          endPeek();
  
          final int startX = (int) mOffsetPixels;
          final int dx = position - startX;
          if (dx == 0 || !animate) {
              setOffsetPixels(position);
              setDrawerState(position == 0 ? STATE_CLOSED : STATE_OPEN);
              stopLayerTranslation();
              return;
          }
  
          int duration;
  
          velocity = Math.abs(velocity);
          if (velocity > 0) {
              duration = 4 * Math.round(1000.f * Math.abs((float) dx / velocity));
          } else {
              duration = (int) (600.f * Math.abs((float) dx / mMenuSize));
          }
  
          duration = Math.min(duration, mMaxAnimationDuration);
          animateOffsetTo(position, duration);
      }