From 660614d1ce70e408f082c3721a7181de64a4d03f Mon Sep 17 00:00:00 2001 From: Luis Cruz Date: Wed, 4 Jan 2017 16:45:31 +0000 Subject: [PATCH] android automatic refactor recycle --- OsmAnd/src/net/osmand/view/ExpandableButton.java | 6 ++++++ OsmAnd/src/net/osmand/view/ExpandableLinearLayout.java | 3 +++ 2 files changed, 9 insertions(+) diff --git a/OsmAnd/src/net/osmand/view/ExpandableButton.java b/OsmAnd/src/net/osmand/view/ExpandableButton.java index 04bc3b25b8..862f4d7444 100644 --- a/OsmAnd/src/net/osmand/view/ExpandableButton.java +++ b/OsmAnd/src/net/osmand/view/ExpandableButton.java @@ -15,6 +15,9 @@ public class ExpandableButton extends Button { if(attrs != null) { TypedArray ar = context.obtainStyledAttributes(attrs, R.styleable.ExpandableView); maxWidth = ar.getDimension(R.styleable.ExpandableView_maxVisibleWidth, 0); + if (ar != null) { + ar.recycle(); + } } } @@ -23,6 +26,9 @@ public class ExpandableButton extends Button { if(attrs != null) { TypedArray ar = context.obtainStyledAttributes(attrs, R.styleable.ExpandableView); maxWidth = ar.getDimension(R.styleable.ExpandableView_maxVisibleWidth, 0); + if (ar != null) { + ar.recycle(); + } } } diff --git a/OsmAnd/src/net/osmand/view/ExpandableLinearLayout.java b/OsmAnd/src/net/osmand/view/ExpandableLinearLayout.java index 5ace4dbf32..52cd2a6263 100644 --- a/OsmAnd/src/net/osmand/view/ExpandableLinearLayout.java +++ b/OsmAnd/src/net/osmand/view/ExpandableLinearLayout.java @@ -15,6 +15,9 @@ public class ExpandableLinearLayout extends LinearLayout { if(attrs != null) { TypedArray ar = context.obtainStyledAttributes(attrs, R.styleable.ExpandableView); maxWidth = ar.getDimension(R.styleable.ExpandableView_maxVisibleWidth, 0); + if (ar != null) { + ar.recycle(); + } } }