public long getLoopDurationMs ( ) { if ( mAnimationBackend == null ) { return 0 ; } if ( mFrameScheduler != null ) { return mFrameScheduler . getLoopDurationMs ( ) ; } int loopDurationMs = 0 ; for ( int i = 0 ; i < mAnimationBackend . getFrameCount ( ) ; i ++ ) { loopDurationMs += mAnimationBackend . getFrameDurationMs ( i ) ; } return loopDurationMs ; }
Get the animation duration for 1 loop by summing all frame durations .