diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-12-14 21:01:55 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-14 21:01:55 +0000 |
commit | 35363b349d9542a0dd124307a498a3daa0e73390 (patch) | |
tree | 041bac7a18db317047e9d41f3fbd478c0cdd10d6 /java/com/android/incallui/autoresizetext | |
parent | 21676ab40c39928c9e893972bac621b8dd5c7092 (diff) | |
parent | 2f91e94b720d579f8ca12d4f3193cfa7a999f99f (diff) |
Merge "Recycle TypedArray for AutoResizeTextView."
Diffstat (limited to 'java/com/android/incallui/autoresizetext')
-rw-r--r-- | java/com/android/incallui/autoresizetext/AutoResizeTextView.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/com/android/incallui/autoresizetext/AutoResizeTextView.java b/java/com/android/incallui/autoresizetext/AutoResizeTextView.java index 2789ceac2..487283a6b 100644 --- a/java/com/android/incallui/autoresizetext/AutoResizeTextView.java +++ b/java/com/android/incallui/autoresizetext/AutoResizeTextView.java @@ -21,6 +21,7 @@ import android.content.res.TypedArray; import android.graphics.RectF; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; +import android.support.annotation.Nullable; import android.text.Layout.Alignment; import android.text.StaticLayout; import android.text.TextPaint; @@ -29,7 +30,6 @@ import android.util.DisplayMetrics; import android.util.SparseIntArray; import android.util.TypedValue; import android.widget.TextView; -import javax.annotation.Nullable; /** * A TextView that automatically scales its text to completely fill its allotted width. @@ -82,6 +82,7 @@ public class AutoResizeTextView extends TextView { TypedArray typedArray = context.getTheme().obtainStyledAttributes( attrs, R.styleable.AutoResizeTextView, defStyleAttr, defStyleRes); readAttrs(typedArray); + typedArray.recycle(); textPaint.set(getPaint()); } |