summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2011-04-14 10:38:05 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-04-14 10:38:05 -0700
commit4b428dc215ccebd36ed7fe6b413ee0ef95b600b5 (patch)
treea2037c57852d48b3c7e6721a9c3a7f991ad3cff4
parent5cde33b7d14841677414fa9f43a043bb4a89ffa7 (diff)
parenta00972ab9a95f945342fdbf58956992e01310398 (diff)
downloadframeworks_base-4b428dc215ccebd36ed7fe6b413ee0ef95b600b5.zip
frameworks_base-4b428dc215ccebd36ed7fe6b413ee0ef95b600b5.tar.gz
frameworks_base-4b428dc215ccebd36ed7fe6b413ee0ef95b600b5.tar.bz2
Merge "Fix around suggestionSpan."
-rw-r--r--core/java/android/text/TextUtils.java7
-rw-r--r--core/java/android/text/style/SuggestionSpan.java4
2 files changed, 8 insertions, 3 deletions
diff --git a/core/java/android/text/TextUtils.java b/core/java/android/text/TextUtils.java
index ee6342a..ac5db62 100644
--- a/core/java/android/text/TextUtils.java
+++ b/core/java/android/text/TextUtils.java
@@ -37,6 +37,7 @@ import android.text.style.ScaleXSpan;
import android.text.style.StrikethroughSpan;
import android.text.style.StyleSpan;
import android.text.style.SubscriptSpan;
+import android.text.style.SuggestionSpan;
import android.text.style.SuperscriptSpan;
import android.text.style.TextAppearanceSpan;
import android.text.style.TypefaceSpan;
@@ -566,7 +567,7 @@ public class TextUtils {
/** @hide */
public static final int ANNOTATION = 18;
/** @hide */
- public static final int CORRECTION_SPAN = 19;
+ public static final int SUGGESTION_SPAN = 19;
/**
* Flatten a CharSequence and whatever styles can be copied across processes
@@ -712,6 +713,10 @@ public class TextUtils {
readSpan(p, sp, new Annotation(p));
break;
+ case SUGGESTION_SPAN:
+ readSpan(p, sp, new SuggestionSpan(p));
+ break;
+
default:
throw new RuntimeException("bogus span encoding " + kind);
}
diff --git a/core/java/android/text/style/SuggestionSpan.java b/core/java/android/text/style/SuggestionSpan.java
index 5091c9e..7083641 100644
--- a/core/java/android/text/style/SuggestionSpan.java
+++ b/core/java/android/text/style/SuggestionSpan.java
@@ -26,7 +26,7 @@ import java.util.Arrays;
import java.util.Locale;
/**
- * Sets correction candidates of words under this span.
+ * Holds suggestion candidates of words under this span.
*/
public class SuggestionSpan implements ParcelableSpan {
@@ -139,7 +139,7 @@ public class SuggestionSpan implements ParcelableSpan {
@Override
public int getSpanTypeId() {
- return TextUtils.CORRECTION_SPAN;
+ return TextUtils.SUGGESTION_SPAN;
}
public static final Parcelable.Creator<SuggestionSpan> CREATOR =