public CloseableAnimatedBitmap(List<Bitmap> bitmaps,List<Integer> durations,ResourceReleaser<Bitmap> resourceReleaser){
  Preconditions.checkNotNull(bitmaps);
  Preconditions.checkState(bitmaps.size() >= 1,"Need at least 1 frame!");
  mBitmaps=new ArrayList<>(bitmaps.size());
  mBitmapReferences=new ArrayList<>(bitmaps.size());
  for (  Bitmap bitmap : bitmaps) {
    mBitmapReferences.add(CloseableReference.of(bitmap,resourceReleaser));
    mBitmaps.add(bitmap);
  }
  mDurations=Preconditions.checkNotNull(durations);
  Preconditions.checkState(mDurations.size() == mBitmaps.size(),"Arrays length mismatch!");
}

public CloseableAnimatedBitmap ( List < Bitmap > bitmaps , List < Integer > durations , ResourceReleaser < Bitmap > resourceReleaser ) { Preconditions . checkNotNull ( bitmaps ) ; Preconditions . checkState ( bitmaps . size ( ) >= 1 , "Need at least 1 frame!" ) ; mBitmaps = new ArrayList < > ( bitmaps . size ( ) ) ; mBitmapReferences = new ArrayList < > ( bitmaps . size ( ) ) ; for ( Bitmap bitmap : bitmaps ) { mBitmapReferences . add ( CloseableReference . of ( bitmap , resourceReleaser ) ) ; mBitmaps . add ( bitmap ) ; } mDurations = Preconditions . checkNotNull ( durations ) ; Preconditions . checkState ( mDurations . size ( ) == mBitmaps . size ( ) , "Arrays length mismatch!" ) ; }
creates a new instance of a closeablestaticbitmap .
