question: private long cancelAnimatorAndGetNewDuration ( long duration , ValueAnimator previousAnimator ) { long newDuration = duration ; if ( previousAnimator != null ) { newDuration = Math . max ( previousAnimator . getDuration ( ) - previousAnimator . getCurrentPlayTime ( ) , newDuration ) ; previousAnimator . cancel ( ) ; } return newDuration ; }
target:  Cancel the previous animator and get the duration of the new animation.