diff options
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/text/SpannableStringBuilder.java | 18 | ||||
| -rw-r--r-- | core/java/android/widget/TextView.java | 1 |
2 files changed, 1 insertions, 18 deletions
diff --git a/core/java/android/text/SpannableStringBuilder.java b/core/java/android/text/SpannableStringBuilder.java index f440853..1d9aa05 100644 --- a/core/java/android/text/SpannableStringBuilder.java +++ b/core/java/android/text/SpannableStringBuilder.java @@ -440,26 +440,10 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable } // Documentation from interface - public SpannableStringBuilder replace(int start, int end, + public SpannableStringBuilder replace(final int start, final int end, CharSequence tb, int tbstart, int tbend) { checkRange("replace", start, end); - // Sanity check - if (start > end) { - Log.w(TAG, "Bad arguments to #replace : " - + "start = " + start + ", end = " + end); - final int tmp = start; - start = end; - end = tmp; - } - if (tbstart > tbend) { - Log.w(TAG, "Bad arguments to #replace : " - + "tbstart = " + tbstart + ", tbend = " + tbend); - final int tmp = tbstart; - tbstart = tbend; - tbend = tmp; - } - int filtercount = mFilters.length; for (int i = 0; i < filtercount; i++) { CharSequence repl = mFilters[i].filter(tb, tbstart, tbend, this, start, end); diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 43c8dde..84202eb 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -5842,7 +5842,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener int end = text.partialEndOffset; if (end > N) end = N; removeParcelableSpans(content, start, end); - // If start > end, content.replace will swap them before using them. content.replace(start, end, text.text); } } |
