Loading core/java/android/text/SpannableStringBuilder.java +16 −8 Original line number Diff line number Diff line Loading @@ -1293,23 +1293,29 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable public boolean equals(Object o) { if (o instanceof Spanned && toString().equals(o.toString())) { Spanned other = (Spanned) o; // Check span data Object[] otherSpans = ((Spanned) o).getSpans(0, ((Spanned) o).length(), Object.class); Object[] otherSpans = other.getSpans(0, other.length(), Object.class); if (mSpanCount == otherSpans.length) { for (int i = 0; i < mSpanCount; ++i) { Object thisSpan = mSpans[i]; Object otherSpan = otherSpans[i]; if (!thisSpan.equals(otherSpan) || getSpanStart(thisSpan) != getSpanStart(otherSpan) || getSpanEnd(thisSpan) != getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != getSpanFlags(otherSpan)) { if (thisSpan == this) { if (other != otherSpan || getSpanStart(thisSpan) != other.getSpanStart(otherSpan) || getSpanEnd(thisSpan) != other.getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != other.getSpanFlags(otherSpan)) { return false; } } else if (!thisSpan.equals(otherSpan) || getSpanStart(thisSpan) != other.getSpanStart(otherSpan) || getSpanEnd(thisSpan) != other.getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != other.getSpanFlags(otherSpan)) { return false; } } return true; } } return false; } Loading @@ -1321,7 +1327,9 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable hash = hash * 31 + mSpanCount; for (int i = 0; i < mSpanCount; ++i) { Object span = mSpans[i]; if (span != this) { hash = hash * 31 + span.hashCode(); } hash = hash * 31 + getSpanStart(span); hash = hash * 31 + getSpanEnd(span); hash = hash * 31 + getSpanFlags(span); Loading core/java/android/text/SpannableStringInternal.java +16 −8 Original line number Diff line number Diff line Loading @@ -363,23 +363,29 @@ import java.lang.reflect.Array; public boolean equals(Object o) { if (o instanceof Spanned && toString().equals(o.toString())) { Spanned other = (Spanned) o; // Check span data Object[] otherSpans = ((Spanned) o).getSpans(0, ((Spanned) o).length(), Object.class); Object[] otherSpans = other.getSpans(0, other.length(), Object.class); if (mSpanCount == otherSpans.length) { for (int i = 0; i < mSpanCount; ++i) { Object thisSpan = mSpans[i]; Object otherSpan = otherSpans[i]; if (!thisSpan.equals(otherSpan) || getSpanStart(thisSpan) != getSpanStart(otherSpan) || getSpanEnd(thisSpan) != getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != getSpanFlags(otherSpan)) { if (thisSpan == this) { if (other != otherSpan || getSpanStart(thisSpan) != other.getSpanStart(otherSpan) || getSpanEnd(thisSpan) != other.getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != other.getSpanFlags(otherSpan)) { return false; } } else if (!thisSpan.equals(otherSpan) || getSpanStart(thisSpan) != other.getSpanStart(otherSpan) || getSpanEnd(thisSpan) != other.getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != other.getSpanFlags(otherSpan)) { return false; } } return true; } } return false; } Loading @@ -391,7 +397,9 @@ import java.lang.reflect.Array; hash = hash * 31 + mSpanCount; for (int i = 0; i < mSpanCount; ++i) { Object span = mSpans[i]; if (span != this) { hash = hash * 31 + span.hashCode(); } hash = hash * 31 + getSpanStart(span); hash = hash * 31 + getSpanEnd(span); hash = hash * 31 + getSpanFlags(span); Loading Loading
core/java/android/text/SpannableStringBuilder.java +16 −8 Original line number Diff line number Diff line Loading @@ -1293,23 +1293,29 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable public boolean equals(Object o) { if (o instanceof Spanned && toString().equals(o.toString())) { Spanned other = (Spanned) o; // Check span data Object[] otherSpans = ((Spanned) o).getSpans(0, ((Spanned) o).length(), Object.class); Object[] otherSpans = other.getSpans(0, other.length(), Object.class); if (mSpanCount == otherSpans.length) { for (int i = 0; i < mSpanCount; ++i) { Object thisSpan = mSpans[i]; Object otherSpan = otherSpans[i]; if (!thisSpan.equals(otherSpan) || getSpanStart(thisSpan) != getSpanStart(otherSpan) || getSpanEnd(thisSpan) != getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != getSpanFlags(otherSpan)) { if (thisSpan == this) { if (other != otherSpan || getSpanStart(thisSpan) != other.getSpanStart(otherSpan) || getSpanEnd(thisSpan) != other.getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != other.getSpanFlags(otherSpan)) { return false; } } else if (!thisSpan.equals(otherSpan) || getSpanStart(thisSpan) != other.getSpanStart(otherSpan) || getSpanEnd(thisSpan) != other.getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != other.getSpanFlags(otherSpan)) { return false; } } return true; } } return false; } Loading @@ -1321,7 +1327,9 @@ public class SpannableStringBuilder implements CharSequence, GetChars, Spannable hash = hash * 31 + mSpanCount; for (int i = 0; i < mSpanCount; ++i) { Object span = mSpans[i]; if (span != this) { hash = hash * 31 + span.hashCode(); } hash = hash * 31 + getSpanStart(span); hash = hash * 31 + getSpanEnd(span); hash = hash * 31 + getSpanFlags(span); Loading
core/java/android/text/SpannableStringInternal.java +16 −8 Original line number Diff line number Diff line Loading @@ -363,23 +363,29 @@ import java.lang.reflect.Array; public boolean equals(Object o) { if (o instanceof Spanned && toString().equals(o.toString())) { Spanned other = (Spanned) o; // Check span data Object[] otherSpans = ((Spanned) o).getSpans(0, ((Spanned) o).length(), Object.class); Object[] otherSpans = other.getSpans(0, other.length(), Object.class); if (mSpanCount == otherSpans.length) { for (int i = 0; i < mSpanCount; ++i) { Object thisSpan = mSpans[i]; Object otherSpan = otherSpans[i]; if (!thisSpan.equals(otherSpan) || getSpanStart(thisSpan) != getSpanStart(otherSpan) || getSpanEnd(thisSpan) != getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != getSpanFlags(otherSpan)) { if (thisSpan == this) { if (other != otherSpan || getSpanStart(thisSpan) != other.getSpanStart(otherSpan) || getSpanEnd(thisSpan) != other.getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != other.getSpanFlags(otherSpan)) { return false; } } else if (!thisSpan.equals(otherSpan) || getSpanStart(thisSpan) != other.getSpanStart(otherSpan) || getSpanEnd(thisSpan) != other.getSpanEnd(otherSpan) || getSpanFlags(thisSpan) != other.getSpanFlags(otherSpan)) { return false; } } return true; } } return false; } Loading @@ -391,7 +397,9 @@ import java.lang.reflect.Array; hash = hash * 31 + mSpanCount; for (int i = 0; i < mSpanCount; ++i) { Object span = mSpans[i]; if (span != this) { hash = hash * 31 + span.hashCode(); } hash = hash * 31 + getSpanStart(span); hash = hash * 31 + getSpanEnd(span); hash = hash * 31 + getSpanFlags(span); Loading