@VisibleForTesting HttpUrlFetcher(GlideUrl glideUrl, int timeout, HttpUrlConnectionFactory connectionFactory) { this.glideUrl = glideUrl; this.timeout = timeout; this.connectionFactory = connectionFactory; }
@VisibleForTesting VideoDecoder( BitmapPool bitmapPool, MediaMetadataRetrieverInitializer<T> initializer, MediaMetadataRetrieverFactory factory) { this.bitmapPool = bitmapPool; this.initializer = initializer; this.factory = factory; }
@VisibleForTesting static class EngineResourceFactory { public <R> EngineResource<R> build(Resource<R> resource, boolean isMemoryCacheable) { return new EngineResource<>(resource, isMemoryCacheable, /*isRecyclable=*/ true); } } }
@VisibleForTesting static class Clock { long now() { return SystemClock.currentThreadTimeMillis(); } } }
@VisibleForTesting static class MediaMetadataRetrieverFactory { public MediaMetadataRetriever build() { return new MediaMetadataRetriever(); } }
@VisibleForTesting Builder setActivityManager(ActivityManager activityManager) { this.activityManager = activityManager; return this; }
@VisibleForTesting static class KeyPool extends BaseKeyPool<Key> { public Key get(int size) { Key result = super.get(); result.init(size); return result; } @Override protected Key create() { return new Key(this); } }
@VisibleForTesting Builder setScreenDimensions(ScreenDimensions screenDimensions) { this.screenDimensions = screenDimensions; return this; }
@VisibleForTesting interface OnEveryFrameListener { void onFrameReady(); } }
@VisibleForTesting static class KeyPool extends BaseKeyPool<Key> { Key get(int width, int height, Bitmap.Config config) { Key result = get(); result.init(width, height, config); return result; } @Override protected Key create() { return new Key(this); } }
@VisibleForTesting ThumbFetcher(Uri mediaStoreImageUri, ThumbnailStreamOpener opener) { this.mediaStoreImageUri = mediaStoreImageUri; this.opener = opener; }
@VisibleForTesting static class GifDecoderFactory { GifDecoder build(GifDecoder.BitmapProvider provider, GifHeader header, ByteBuffer data, int sampleSize) { return new StandardGifDecoder(provider, header, data, sampleSize); } }
@VisibleForTesting static class KeyPool extends BaseKeyPool<Key> { public Key get(int size, Bitmap.Config config) { Key result = get(); result.init(size, config); return result; } @Override protected Key create() { return new Key(this); } }
@VisibleForTesting ThumbnailRequestCoordinator() { this(/*parent=*/ null); }
@VisibleForTesting BitmapPreFillRunner( BitmapPool bitmapPool, MemoryCache memoryCache, PreFillQueue allocationOrder, Clock clock, Handler handler) { this.bitmapPool = bitmapPool; this.memoryCache = memoryCache; this.toPrefill = allocationOrder; this.clock = clock; this.handler = handler; }
@VisibleForTesting interface MediaMetadataRetrieverInitializer<T> { void initialize(MediaMetadataRetriever retriever, T data); }
@VisibleForTesting void setDequeuedResourceCallback(DequeuedResourceCallback cb) { this.cb = cb; }
@VisibleForTesting interface DequeuedResourceCallback { void onResourceDequeued(); }
@VisibleForTesting public LruArrayPool() { maxSize = DEFAULT_SIZE; }
@VisibleForTesting GlideExecutor(ExecutorService delegate) { this.delegate = delegate; }