summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJin Cao <jinyan@google.com>2014-08-18 17:50:31 -0700
committerJin Cao <jinyan@google.com>2014-08-18 17:50:31 -0700
commit049af326764fafc35a837a38ee29879a89d2e446 (patch)
tree62c102da2128117fb93b217c9bbdde8c825d8c8f
parent6c2a016fb00482339dc66b93822042f9f9e2424f (diff)
downloadandroid_frameworks_opt_chips-049af326764fafc35a837a38ee29879a89d2e446.tar.gz
android_frameworks_opt_chips-049af326764fafc35a837a38ee29879a89d2e446.tar.bz2
android_frameworks_opt_chips-049af326764fafc35a837a38ee29879a89d2e446.zip
Remove unnecessary font metrics call
Change-Id: Ie36a3a29b81d3e0024e0f1c29aec98a36e74dec9
-rw-r--r--src/com/android/ex/chips/recipientchip/ReplacementDrawableSpan.java3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/com/android/ex/chips/recipientchip/ReplacementDrawableSpan.java b/src/com/android/ex/chips/recipientchip/ReplacementDrawableSpan.java
index 1cfbe8f..f99b25b 100644
--- a/src/com/android/ex/chips/recipientchip/ReplacementDrawableSpan.java
+++ b/src/com/android/ex/chips/recipientchip/ReplacementDrawableSpan.java
@@ -13,7 +13,6 @@ import android.text.style.ReplacementSpan;
public class ReplacementDrawableSpan extends ReplacementSpan {
protected Drawable mDrawable;
private final Paint mWorkPaint = new Paint();
- private final Paint.FontMetricsInt mFontMetrics = new Paint.FontMetricsInt();
private float mExtraMargin;
public ReplacementDrawableSpan(Drawable drawable) {
@@ -50,8 +49,6 @@ public class ReplacementDrawableSpan extends ReplacementSpan {
@Override
public void draw(Canvas canvas, CharSequence charSequence, int start, int end, float x, int top,
int y, int bottom, Paint paint) {
- setupFontMetrics(mFontMetrics, paint);
-
canvas.save();
int transY = (bottom - mDrawable.getBounds().bottom + top) / 2;
canvas.translate(x, transY);