Loading core/java/android/widget/SpellChecker.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -249,7 +249,6 @@ public class SpellChecker implements SpellCheckerSessionListener { final int spanEnd = editable.getSpanEnd(suggestionSpans[i]); final int spanEnd = editable.getSpanEnd(suggestionSpans[i]); if (spanStart != start || spanEnd != end) { if (spanStart != start || spanEnd != end) { suggestionSpans[i] = null; suggestionSpans[i] = null; break; } } } } Loading core/java/android/widget/TextView.java +8 −11 Original line number Original line Diff line number Diff line Loading @@ -9607,15 +9607,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener SpannableStringBuilder text = new SpannableStringBuilder(); SpannableStringBuilder text = new SpannableStringBuilder(); TextAppearanceSpan highlightSpan = new TextAppearanceSpan(mContext, TextAppearanceSpan highlightSpan = new TextAppearanceSpan(mContext, android.R.style.TextAppearance_SuggestionHighlight); android.R.style.TextAppearance_SuggestionHighlight); void removeMisspelledFlag() { int suggestionSpanFlags = suggestionSpan.getFlags(); if ((suggestionSpanFlags & SuggestionSpan.FLAG_MISSPELLED) > 0) { suggestionSpanFlags &= ~SuggestionSpan.FLAG_MISSPELLED; suggestionSpanFlags &= ~SuggestionSpan.FLAG_EASY_CORRECT; suggestionSpan.setFlags(suggestionSpanFlags); } } } } private class SuggestionAdapter extends BaseAdapter { private class SuggestionAdapter extends BaseAdapter { Loading Loading @@ -9931,6 +9922,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener suggestionSpansStarts[i] = editable.getSpanStart(suggestionSpan); suggestionSpansStarts[i] = editable.getSpanStart(suggestionSpan); suggestionSpansEnds[i] = editable.getSpanEnd(suggestionSpan); suggestionSpansEnds[i] = editable.getSpanEnd(suggestionSpan); suggestionSpansFlags[i] = editable.getSpanFlags(suggestionSpan); suggestionSpansFlags[i] = editable.getSpanFlags(suggestionSpan); // Remove potential misspelled flags int suggestionSpanFlags = suggestionSpan.getFlags(); if ((suggestionSpanFlags & SuggestionSpan.FLAG_MISSPELLED) > 0) { suggestionSpanFlags &= ~SuggestionSpan.FLAG_MISSPELLED; suggestionSpanFlags &= ~SuggestionSpan.FLAG_EASY_CORRECT; suggestionSpan.setFlags(suggestionSpanFlags); } } } final int suggestionStart = suggestionInfo.suggestionStart; final int suggestionStart = suggestionInfo.suggestionStart; Loading @@ -9939,8 +9938,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener suggestionStart, suggestionEnd).toString(); suggestionStart, suggestionEnd).toString(); editable.replace(spanStart, spanEnd, suggestion); editable.replace(spanStart, spanEnd, suggestion); suggestionInfo.removeMisspelledFlag(); // Notify source IME of the suggestion pick. Do this before swaping texts. // Notify source IME of the suggestion pick. Do this before swaping texts. if (!TextUtils.isEmpty( if (!TextUtils.isEmpty( suggestionInfo.suggestionSpan.getNotificationTargetClassName())) { suggestionInfo.suggestionSpan.getNotificationTargetClassName())) { Loading Loading
core/java/android/widget/SpellChecker.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -249,7 +249,6 @@ public class SpellChecker implements SpellCheckerSessionListener { final int spanEnd = editable.getSpanEnd(suggestionSpans[i]); final int spanEnd = editable.getSpanEnd(suggestionSpans[i]); if (spanStart != start || spanEnd != end) { if (spanStart != start || spanEnd != end) { suggestionSpans[i] = null; suggestionSpans[i] = null; break; } } } } Loading
core/java/android/widget/TextView.java +8 −11 Original line number Original line Diff line number Diff line Loading @@ -9607,15 +9607,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener SpannableStringBuilder text = new SpannableStringBuilder(); SpannableStringBuilder text = new SpannableStringBuilder(); TextAppearanceSpan highlightSpan = new TextAppearanceSpan(mContext, TextAppearanceSpan highlightSpan = new TextAppearanceSpan(mContext, android.R.style.TextAppearance_SuggestionHighlight); android.R.style.TextAppearance_SuggestionHighlight); void removeMisspelledFlag() { int suggestionSpanFlags = suggestionSpan.getFlags(); if ((suggestionSpanFlags & SuggestionSpan.FLAG_MISSPELLED) > 0) { suggestionSpanFlags &= ~SuggestionSpan.FLAG_MISSPELLED; suggestionSpanFlags &= ~SuggestionSpan.FLAG_EASY_CORRECT; suggestionSpan.setFlags(suggestionSpanFlags); } } } } private class SuggestionAdapter extends BaseAdapter { private class SuggestionAdapter extends BaseAdapter { Loading Loading @@ -9931,6 +9922,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener suggestionSpansStarts[i] = editable.getSpanStart(suggestionSpan); suggestionSpansStarts[i] = editable.getSpanStart(suggestionSpan); suggestionSpansEnds[i] = editable.getSpanEnd(suggestionSpan); suggestionSpansEnds[i] = editable.getSpanEnd(suggestionSpan); suggestionSpansFlags[i] = editable.getSpanFlags(suggestionSpan); suggestionSpansFlags[i] = editable.getSpanFlags(suggestionSpan); // Remove potential misspelled flags int suggestionSpanFlags = suggestionSpan.getFlags(); if ((suggestionSpanFlags & SuggestionSpan.FLAG_MISSPELLED) > 0) { suggestionSpanFlags &= ~SuggestionSpan.FLAG_MISSPELLED; suggestionSpanFlags &= ~SuggestionSpan.FLAG_EASY_CORRECT; suggestionSpan.setFlags(suggestionSpanFlags); } } } final int suggestionStart = suggestionInfo.suggestionStart; final int suggestionStart = suggestionInfo.suggestionStart; Loading @@ -9939,8 +9938,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener suggestionStart, suggestionEnd).toString(); suggestionStart, suggestionEnd).toString(); editable.replace(spanStart, spanEnd, suggestion); editable.replace(spanStart, spanEnd, suggestion); suggestionInfo.removeMisspelledFlag(); // Notify source IME of the suggestion pick. Do this before swaping texts. // Notify source IME of the suggestion pick. Do this before swaping texts. if (!TextUtils.isEmpty( if (!TextUtils.isEmpty( suggestionInfo.suggestionSpan.getNotificationTargetClassName())) { suggestionInfo.suggestionSpan.getNotificationTargetClassName())) { Loading