Commits

Brian Muramatsu authored 4c8ad6eb624
Fix TextUtils#commaEllipsize Bug 3400770 TextUtils#commaEllipsize creates a MeasuredText "mt" object with the text to be ellipsized. It calls setPara which initializes mt's mPos member to be 0. It then calls addStyleRun which moves mPos to the end of the string. The loop back in commaEllipsize then calls mt addStyleRun again and this causes IndexOutOfBoundsException, because the paint object is trying to measure text past the text's length. It seems this was a typo and that the tempMt variable should be used, because the code is trying to measure the format string...not the the string to be ellipsized. This makes the saner parts of CTS test for this method pass now. Change-Id: Ib6aa6e4bbd6afff4c95ad4c4d51a384cc1389875