docs: private void repaintDueToPlaybackStateChange(long oldMaxPosition, long newMaxPosition,
                                                   PlaybackState oldState, PlaybackState newState) {
          if (duration.get() > 0) {  // We are only drawing markers if we know the track duration
              final int width = waveformWidth() + 8;
  
              // See if we need to redraw a stretch of the “played until” stripe.
              if (oldMaxPosition > newMaxPosition) {
                  final int left = Math.max(0, Math.min(width, millisecondsToX(newMaxPosition) - 6));
                  final int right = Math.max(0, Math.min(width, millisecondsToX(oldMaxPosition) + 6));
                  delegatingRepaint(left, 0, right - left, getHeight());
              } else if (newMaxPosition > oldMaxPosition) {
                  final int left = Math.max(0, Math.min(width, millisecondsToX(oldMaxPosition) - 6));
                  final int right = Math.max(0, Math.min(width, millisecondsToX(newMaxPosition) + 6));
                  delegatingRepaint(left, 0, right - left, getHeight());
              }
  
              // Also refresh where the specific marker was moved from and/or to.
              if (oldState != null && (newState == null || newState.position != oldState.position)) {
                  final int left = Math.max(0, Math.min(width, millisecondsToX(oldState.position) - 6));
                  final int right = Math.max(0, Math.min(width, millisecondsToX(oldState.position) + 6));
                  delegatingRepaint(left, 0, right - left, getHeight());
              }
              if (newState != null && (oldState == null || newState.position != oldState.position)) {
                  final int left = Math.max(0, Math.min(width, millisecondsToX(newState.position) - 6));
                  final int right = Math.max(0, Math.min(width, millisecondsToX(newState.position) + 6));
                  delegatingRepaint(left, 0, right - left, getHeight());
              }
          }
      }