Merge "Populate RangeInfo correctly when acquiring from pool" into nyc-dev
am: c1699a9
* commit 'c1699a9f4cf679ebc87e5b5bc99dd07446950be7':
Populate RangeInfo correctly when acquiring from pool
Change-Id: I0227f6b9a842fa1e63827cda51e0cb5a435e278e
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user