private int setProgress() {
    if (mFensterPlayer == null || mDragging) {
      return 0;
    }
    int position = mFensterPlayer.getCurrentPosition();
    int duration = mFensterPlayer.getDuration();
    if (mProgress != null) {
      if (duration > 0) {
        // use long to avoid overflow
        long pos = 1000L * position / duration;
        mProgress.setProgress((int) pos);
      }
      int percent = mFensterPlayer.getBufferPercentage();
      mProgress.setSecondaryProgress(percent * 10);
    }

    if (mEndTime != null) {
      mEndTime.setText(stringForTime(duration));
    }
    if (mCurrentTime != null) {
      mCurrentTime.setText(stringForTime(position));
    }
    final int playedSeconds = position / 1000;
    if (lastPlayedSeconds != playedSeconds) {
      lastPlayedSeconds = playedSeconds;
    }
    return position;
  }