Merge "Recycle obtained TypedArrays"

This commit is contained in:
TreeHugger Robot
2022-02-10 18:32:49 +00:00
committed by Android (Google) Code Review

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) {