Fix resource leak caused by TypedArray type
Change-Id: If4a95fe7d3b7686c3189fae803c795bcf5accf24 Signed-off-by: Jia Jia <jia.jia@zte.com.cn>
This commit is contained in:
@@ -87,7 +87,13 @@ public class AccessPointPreference extends Preference {
|
||||
// Fallback for platforms that do not need friction icon resources.
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user