Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62aeada1 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Use TextUtils.substring instead of String.substring.

This is a small refactoring of using substring method.
Calling TextUtils.substring is more efficient than calling
toString and String.substring.

Change-Id: I0a740b2a2fdbfb6b6155c4e926e17889025082f5
parent 7f6fad0d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3023,7 +3023,7 @@ public class Editor {
                return;
            }

            final String originalText = editable.toString().substring(spanStart, spanEnd);
            final String originalText = TextUtils.substring(editable, spanStart, spanEnd);

            if (suggestionInfo.suggestionIndex == ADD_TO_DICTIONARY) {
                Intent intent = new Intent(Settings.ACTION_USER_DICTIONARY_INSERT);