*/
private void endTimeline(Timeline timeline) {
getAnimatorThread();
if (this.runningTimelines.contains(timeline)) {
this.runningTimelines.remove(timeline);
TimelineState oldState = timeline.getState();
float endPosition = timeline.timelinePosition;
while (timeline.getState() != TimelineState.IDLE) {
TimelineState state = timeline.popState();
if (state == TimelineState.PLAYING_FORWARD)
endPosition = 1.0f;
if (state == TimelineState.PLAYING_REVERSE)
endPosition = 0.0f;
}