question: private void fixSpannedWithSpaces ( SpannableStringBuilder builder , int widthMeasureSpec , int heightMeasureSpec ) { long startFix = System . currentTimeMillis ( ) ; FixingResult result = addSpacesAroundSpansUntilFixed ( builder , widthMeasureSpec , heightMeasureSpec ) ; if ( result . fixed ) { removeUnneededSpaces ( widthMeasureSpec , heightMeasureSpec , builder , result ) ; } else { fallbackToString ( widthMeasureSpec , heightMeasureSpec ) ; } if ( BuildConfig . DEBUG ) { long fixDuration = System . currentTimeMillis ( ) - startFix ; Log . d ( HtmlTextView . TAG , "fixSpannedWithSpaces() duration in ms: " + fixDuration ) ; } }
target:  Add spaces around spans until the text is fixed, and then removes the unneeded spaces