Merge "Fix resource leak caused by TypedArray type"
This commit is contained in:
@@ -87,7 +87,13 @@ public class AccessPointPreference extends Preference {
|
|||||||
// Fallback for platforms that do not need friction icon resources.
|
// Fallback for platforms that do not need friction icon resources.
|
||||||
frictionSld = null;
|
frictionSld = null;
|
||||||
}
|
}
|
||||||
return frictionSld != null ? (StateListDrawable) frictionSld.getDrawable(0) : null;
|
if (frictionSld != null) {
|
||||||
|
StateListDrawable val = (StateListDrawable) frictionSld.getDrawable(0);
|
||||||
|
frictionSld.recycle();
|
||||||
|
return val;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used for fake pref.
|
// Used for fake pref.
|
||||||
|
|||||||
Reference in New Issue
Block a user