private AnimatedDrawableBackendProvider getAnimatedDrawableBackendProvider() { if (mAnimatedDrawableBackendProvider == null) { mAnimatedDrawableBackendProvider = new AnimatedDrawableBackendProvider() { @Override public AnimatedDrawableBackend get(AnimatedImageResult animatedImageResult, Rect bounds) { return new AnimatedDrawableBackendImpl( getAnimatedDrawableUtil(), animatedImageResult, bounds); } }; } return mAnimatedDrawableBackendProvider; }
private AnimatedImageFactory buildAnimatedImageFactory() { AnimatedDrawableBackendProvider animatedDrawableBackendProvider = new AnimatedDrawableBackendProvider() { @Override public AnimatedDrawableBackend get(AnimatedImageResult imageResult, Rect bounds) { return new AnimatedDrawableBackendImpl(getAnimatedDrawableUtil(), imageResult, bounds); } }; return new AnimatedImageFactoryImpl(animatedDrawableBackendProvider, mPlatformBitmapFactory); }