private static boolean isWrongRange(TextRange valueRange, int maxLength) {
    return valueRange.getStartOffset() < 0 || valueRange.getEndOffset() > maxLength;
  }
private static boolean isWrongRange(TextRange valueRange, int maxLength)