Fix memory leak on wifi
Google: 3425623 Change-Id: I5cd3c427280ebb2e8ed1b18d39d1b29c962b7658 Signed-off-by: Jia Jia <jia.jia@zte.com.cn>
This commit is contained in:
@@ -262,7 +262,13 @@ public class WifiEntryPreference extends RestrictedPreference implements
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user