Recycle obtained TypedArrays

Bug: 218835043
Test: make
Change-Id: Ibbd29e36e8d830fcd2794997ef4bc8b3b34179ac
This commit is contained in:
Nikolas Havrikov
2022-02-10 15:06:16 +01:00
parent b0385bd966
commit be93dccccd

View File

@@ -61,6 +61,7 @@ public class RestrictedSwitchPreference extends SwitchPreference {
final TypedValue restrictedSwitchSummary = attributes.peekValue(
R.styleable.RestrictedSwitchPreference_restrictedSwitchSummary);
attributes.recycle();
if (restrictedSwitchSummary != null
&& restrictedSwitchSummary.type == TypedValue.TYPE_STRING) {
if (restrictedSwitchSummary.resourceId != 0) {