Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4407d1f3 authored by Nikolas Havrikov's avatar Nikolas Havrikov
Browse files

Recycle obtained TypedArrays

Bug: 218835043
Test: make
Change-Id: I27c679c164920dc4b1096a316432f64501a85ae5
parent b0385bd9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -217,6 +217,7 @@ public class SuggestionSpan extends CharacterStyle implements ParcelableSpan {
                com.android.internal.R.styleable.SuggestionSpan_textUnderlineThickness, 0);
        mMisspelledUnderlineColor = typedArray.getColor(
                com.android.internal.R.styleable.SuggestionSpan_textUnderlineColor, Color.BLACK);
        typedArray.recycle();

        defStyleAttr = com.android.internal.R.attr.textAppearanceGrammarErrorSuggestion;
        typedArray = context.obtainStyledAttributes(
@@ -225,6 +226,7 @@ public class SuggestionSpan extends CharacterStyle implements ParcelableSpan {
                com.android.internal.R.styleable.SuggestionSpan_textUnderlineThickness, 0);
        mGrammarErrorUnderlineColor = typedArray.getColor(
                com.android.internal.R.styleable.SuggestionSpan_textUnderlineColor, Color.BLACK);
        typedArray.recycle();

        defStyleAttr = com.android.internal.R.attr.textAppearanceEasyCorrectSuggestion;
        typedArray = context.obtainStyledAttributes(
@@ -233,6 +235,7 @@ public class SuggestionSpan extends CharacterStyle implements ParcelableSpan {
                com.android.internal.R.styleable.SuggestionSpan_textUnderlineThickness, 0);
        mEasyCorrectUnderlineColor = typedArray.getColor(
                com.android.internal.R.styleable.SuggestionSpan_textUnderlineColor, Color.BLACK);
        typedArray.recycle();

        defStyleAttr = com.android.internal.R.attr.textAppearanceAutoCorrectionSuggestion;
        typedArray = context.obtainStyledAttributes(
@@ -241,6 +244,7 @@ public class SuggestionSpan extends CharacterStyle implements ParcelableSpan {
                com.android.internal.R.styleable.SuggestionSpan_textUnderlineThickness, 0);
        mAutoCorrectionUnderlineColor = typedArray.getColor(
                com.android.internal.R.styleable.SuggestionSpan_textUnderlineColor, Color.BLACK);
        typedArray.recycle();
    }

    public SuggestionSpan(Parcel src) {