AI 143815: am: CL 143758 Fixes #1749387. When a client of VelocityTracker obtains an instance from the pool, actually remove the object from the pool. Otherwise, several clients can share the same VelocityTracker which can lead to really weird side effects (including concurrency and UI issues.)
Original author: romainguy Merged from: //branches/cupcake/... Automated import of CL 143815
This commit is contained in:
committed by
The Android Open Source Project
parent
617f877c06
commit
fb43fea68a
@@ -58,6 +58,7 @@ public final class VelocityTracker {
|
||||
VelocityTracker vt = mPool[0];
|
||||
if (vt != null) {
|
||||
vt.clear();
|
||||
mPool[0] = null;
|
||||
return vt;
|
||||
}
|
||||
return new VelocityTracker();
|
||||
|
||||
Reference in New Issue
Block a user