Search in sources :

Example 1 with SerialExecutorService

use of com.facebook.common.executors.SerialExecutorService in project fresco by facebook.

the class AnimatedFactoryImpl method getAnimatedDrawableFactory.

@Override
public AnimatedDrawableFactory getAnimatedDrawableFactory(Context context) {
    if (mAnimatedDrawableFactory == null) {
        SerialExecutorService serialExecutorService = new DefaultSerialExecutorService(mExecutorSupplier.forDecode());
        ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
        mAnimatedDrawableFactory = buildAnimatedDrawableFactory(serialExecutorService, activityManager, getAnimatedDrawableUtil(), getAnimatedDrawableBackendProvider(), UiThreadImmediateExecutorService.getInstance(), RealtimeSinceBootClock.get(), context.getResources());
    }
    return mAnimatedDrawableFactory;
}
Also used : DefaultSerialExecutorService(com.facebook.common.executors.DefaultSerialExecutorService) DefaultSerialExecutorService(com.facebook.common.executors.DefaultSerialExecutorService) SerialExecutorService(com.facebook.common.executors.SerialExecutorService) ActivityManager(android.app.ActivityManager)

Aggregations

ActivityManager (android.app.ActivityManager)1 DefaultSerialExecutorService (com.facebook.common.executors.DefaultSerialExecutorService)1 SerialExecutorService (com.facebook.common.executors.SerialExecutorService)1