Merge "Populate RangeInfo correctly when acquiring from pool" into nyc-dev

This commit is contained in:
TreeHugger Robot
2016-04-14 00:28:27 +00:00
committed by Android (Google) Code Review

View File

@@ -3842,7 +3842,15 @@ public class AccessibilityNodeInfo implements Parcelable {
*/
public static RangeInfo obtain(int type, float min, float max, float current) {
RangeInfo info = sPool.acquire();
return (info != null) ? info : new RangeInfo(type, min, max, current);
if (info == null) {
return new RangeInfo(type, min, max, current);
}
info.mType = type;
info.mMin = min;
info.mMax = max;
info.mCurrent = current;
return info;
}
/**