summaryrefslogtreecommitdiffstats
path: root/core/java/android/text
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-09-19 23:16:52 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-19 23:16:52 +0000
commit69eb21074f57ad349e301b432726fd7518fefe6f (patch)
treeff25615095551e22c114649a11db71bc99ef33c4 /core/java/android/text
parent8ab25d82b56c7604dc945e4385b74a75de093e56 (diff)
parent4fec1b488759a89732af151e21a89aa6693ba9bf (diff)
downloadframeworks_base-69eb21074f57ad349e301b432726fd7518fefe6f.zip
frameworks_base-69eb21074f57ad349e301b432726fd7518fefe6f.tar.gz
frameworks_base-69eb21074f57ad349e301b432726fd7518fefe6f.tar.bz2
am 4fec1b48: am 600ca140: Merge "Use constants instead of resources for ellipsis."
* commit '4fec1b488759a89732af151e21a89aa6693ba9bf': Use constants instead of resources for ellipsis.
Diffstat (limited to 'core/java/android/text')
-rw-r--r--core/java/android/text/TextUtils.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/java/android/text/TextUtils.java b/core/java/android/text/TextUtils.java
index 3502b52..8a8c6d8 100644
--- a/core/java/android/text/TextUtils.java
+++ b/core/java/android/text/TextUtils.java
@@ -63,6 +63,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 */ }
@@ -1081,14 +1083,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);
}
/**