/**
  * Return in bounds (allocated by the caller) the smallest rectangle that encloses all of the
  * characters, with an implied origin at (0,0).
  *
  * @param text Array of chars to measure and return their unioned bounds
  * @param index Index of the first char in the array to measure
  * @param count The number of chars, beginning at index, to measure
  * @param bounds Returns the unioned bounds of all the text. Must be allocated by the caller.
  */
 public void getTextBounds(char[] text, int index, int count, Rect bounds) {
   if ((index | count) < 0 || index + count > text.length) {
     throw new ArrayIndexOutOfBoundsException();
   }
   if (bounds == null) {
     throw new NullPointerException("need bounds Rect");
   }
   nativeGetCharArrayBounds(mNativePaint, text, index, count, bounds);
 }