private static void swap(int[] array, int i, int j) {
    int tmp = array[i];
    array[i] = array[j];
    array[j] = tmp;
  }
Attempts to fix a StaticLayout with wrong layout information that can result in
StringIndexOutOfBoundsException during layout.draw().

@param layout The {@link StaticLayout} to fix
@return Whether the layout was fixed or not
library/src/main/java/com/facebook/fbui/textlayoutbuilder/StaticLayoutHelper.java