public GlideContext( Context context, ArrayPool arrayPool, Registry registry, ImageViewTargetFactory imageViewTargetFactory, RequestOptions defaultRequestOptions, Map<Class<?>, TransitionOptions<?, ?>> defaultTransitionOptions, Engine engine, int logLevel) { super(context.getApplicationContext()); this.arrayPool = arrayPool; this.registry = registry; this.imageViewTargetFactory = imageViewTargetFactory; this.defaultRequestOptions = defaultRequestOptions; this.defaultTransitionOptions = defaultTransitionOptions; this.engine = engine; this.logLevel = logLevel; mainHandler = new Handler(Looper.getMainLooper()); }
public GlideContext(Context context, Registry registry, ImageViewTargetFactory imageViewTargetFactory, RequestOptions defaultRequestOptions, Engine engine, ComponentCallbacks2 componentCallbacks, int logLevel) { super(context.getApplicationContext()); this.registry = registry; this.imageViewTargetFactory = imageViewTargetFactory; this.defaultRequestOptions = defaultRequestOptions; this.engine = engine; this.componentCallbacks = componentCallbacks; this.logLevel = logLevel; mainHandler = new Handler(Looper.getMainLooper()); }
@Before public void setUp() { Application app = RuntimeEnvironment.application; transitionOptions = new HashMap<>(); context = new GlideContext( app, new LruArrayPool(), new Registry(), new ImageViewTargetFactory(), new RequestOptions(), transitionOptions, mock(Engine.class), Log.DEBUG); }