diff options
| author | Elliott Hughes <enh@google.com> | 2014-09-19 22:02:45 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-09-19 22:02:45 +0000 |
| commit | 600ca140e2e31e76f9bef7d484387ea366812cb3 (patch) | |
| tree | d93d96f3750694493d47963346b0eb3055c829cf /core/java/android | |
| parent | 799812cd6f7f9aa4a87d81dafd273d51ac5ba992 (diff) | |
| parent | ed0daa93e48d38e54a7ad1c99c461510a4c07599 (diff) | |
| download | frameworks_base-600ca140e2e31e76f9bef7d484387ea366812cb3.zip frameworks_base-600ca140e2e31e76f9bef7d484387ea366812cb3.tar.gz frameworks_base-600ca140e2e31e76f9bef7d484387ea366812cb3.tar.bz2 | |
Merge "Use constants instead of resources for ellipsis."
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/text/TextUtils.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/java/android/text/TextUtils.java b/core/java/android/text/TextUtils.java index a5e62e1..dcf3a40 100644 --- a/core/java/android/text/TextUtils.java +++ b/core/java/android/text/TextUtils.java @@ -61,6 +61,8 @@ import java.util.regex.Pattern; public class TextUtils { private static final String TAG = "TextUtils"; + private static final String ELLIPSIS = new String(Layout.ELLIPSIS_NORMAL); + private static final String ELLIPSIS_TWO_DOTS = new String(Layout.ELLIPSIS_TWO_DOTS); private TextUtils() { /* cannot be instantiated */ } @@ -1068,14 +1070,9 @@ public class TextUtils { float avail, TruncateAt where, boolean preserveLength, EllipsizeCallback callback) { - - final String ellipsis = (where == TruncateAt.END_SMALL) ? - Resources.getSystem().getString(R.string.ellipsis_two_dots) : - Resources.getSystem().getString(R.string.ellipsis); - return ellipsize(text, paint, avail, where, preserveLength, callback, TextDirectionHeuristics.FIRSTSTRONG_LTR, - ellipsis); + (where == TruncateAt.END_SMALL) ? ELLIPSIS_TWO_DOTS : ELLIPSIS); } /** |
